![]() |
Routines |
Prev: 55408 | Up: Map | Next: 55508 |
Used by the routine at GoldfishGame.
|
|||||
|
|||||
GoldfishGame_AnimateBoats | 55458 | LD A,(55613) | A=*GoldfishGame_BuoyancyCounter. | ||
55461 | AND %00000001 | Keep only bit 0. | |||
55463 | RET Z | Return if the result is zero. | |||
55464 | LD DE,16384 | DE=16384 (screen buffer location). | |||
55467 | LD B,8 | B=8. | |||
GoldfishGame_AnimateBoats_0 | 55469 | PUSH BC | Stash BC and DE on the stack. | ||
55470 | PUSH DE | ||||
55471 | LD B,8 | B=8. | |||
GoldfishGame_AnimateBoats_1 | 55473 | PUSH BC | Stash BC and DE on the stack. | ||
55474 | PUSH DE | ||||
55475 | LD A,(DE) | A=*DE. | |||
55476 | RL A | Rotate A left. | |||
55478 | PUSH AF | Stash AF on the stack. | |||
55479 | LD HL,31 | HL=0031. | |||
55482 | ADD HL,DE | HL+=DE. | |||
55483 | LD B,32 | B=32. | |||
GoldfishGame_AnimateBoats_2 | 55485 | POP AF | Restore AF from the stack. | ||
55486 | RL (HL) | Rotate *HL left. | |||
55488 | PUSH AF | Stash AF on the stack. | |||
55489 | DEC HL | Decrease HL by one. | |||
55490 | DJNZ GoldfishGame_AnimateBoats_2 | Decrease counter by one and loop back to GoldfishGame_AnimateBoats_2 until counter is zero. | |||
55492 | POP AF | Restore AF and DE from the stack. | |||
55493 | POP DE | ||||
55494 | LD HL,32 | HL=0032. | |||
55497 | ADD HL,DE | HL+=DE. | |||
55498 | EX DE,HL | Exchange the DE and HL registers. | |||
55499 | POP BC | Restore BC from the stack. | |||
55500 | DJNZ GoldfishGame_AnimateBoats_1 | Decrease counter by one and loop back to GoldfishGame_AnimateBoats_1 until counter is zero. | |||
55502 | POP DE | Restore DE and BC from the stack. | |||
55503 | POP BC | ||||
55504 | INC D | Increment D by one. | |||
55505 | DJNZ GoldfishGame_AnimateBoats_0 | Decrease counter by one and loop back to GoldfishGame_AnimateBoats_0 until counter is zero. | |||
55507 | RET | Return. |
Prev: 55408 | Up: Map | Next: 55508 |