| Dynamite Dan | Routines |
| Prev: F020 | Up: Map | Next: F052 |
|
Used by the routine at CDD3.
|
||||
| F021 | LD HL,$F020 | Get the current animation flag. | ||
| F024 | AND A | Is it zero? | ||
| F025 | JR NZ,$F02B | Jump forward if not. | ||
| F027 | LD A,$08 | Start at index 8. | ||
| F029 | JR $F03B | Jump foward. | ||
| F02B | BIT 7,A | Is the index 80 or above? | ||
| F02D | JR NZ,$F033 | Jump forward if it isn't. | ||
| F02F | XOR A | Otherwise reset the index to 0. | ||
| F030 | LD (HL),A | |||
| F031 | JR $F03B | |||
|
Go to the next index.
|
||||
| F033 | INC (HL) | Increment the index. | ||
| F034 | LD A,(HL) | Is it above 9? | ||
| F035 | CP $09 | |||
| F037 | JR C,$F03B | Jump forward if it is. | ||
| F039 | LD A,$08 | Otherwise initialise it to 8. | ||
|
Now draw the graphic
|
||||
| F03B | ADD A,A | Double the index to get a word offset. | ||
| F03C | LD C,A | Put the address in BC. | ||
| F03D | LD B,$00 | |||
| F03F | LD HL,$F052 | Add the base offset to the dying graphic table. | ||
| F042 | ADD HL,BC | |||
| F043 | LD A,(HL) | Put the actual address in HL. | ||
| F044 | INC HL | |||
| F045 | LD H,(HL) | |||
| F046 | LD L,A | |||
| F047 | LD B,(HL) | Put the width in B. | ||
| F048 | INC HL | |||
| F049 | LD C,(HL) | Put the depth in C. | ||
| F04A | INC HL | |||
| F04B | LD DE,$1B0B | Position is always 0B , 1B. | ||
| F04E | CALL $E87A | Put the graphic on screen and return. | ||
| F051 | RET | |||
| Prev: F020 | Up: Map | Next: F052 |