![]() |
Routines |
| Prev: B05A | Up: Map | Next: B075 |
|
Used by the routines at MoveSpark, MoveThief, MoveDestroyer, MoveSaucer, MoveDome and MoveRobotHorizontally.
Adds one to the lowest two bits of an entity's type, so a four-frame sprite moves on to the next frame. This is the handler for entity types 70 to 73, the activated terminal.
|
||||||||
| NextSpriteNumber | B063 | PUSH BC | Save BC. | |||||
| B064 | LD A,(IX+$00) | Fetch the type of the entity... | ||||||
| B067 | LD C,A | ...and keep it in C. | ||||||
| B068 | INC A | Add one... | ||||||
| B069 | AND $03 | ...keep the lowest two bits, and put them in B. | ||||||
| B06B | LD B,A | |||||||
| B06C | LD A,C | Fetch the type again... | ||||||
| B06D | AND $FC | ...replace the lowest two bits with the new ones. | ||||||
| B06F | OR B | |||||||
| B070 | LD (IX+$00),A | Store the type of the entity. | ||||||
| B073 | POP BC | Restore BC. | ||||||
| B074 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: B05A | Up: Map | Next: B075 |