![]() |
Routines |
| Prev: 9507 | Up: Map | Next: 955F |
|
The code for an object of type 1E, which is run by RunObjectHandler.
|
||||||||
| UpdateType1E | 9524 | LD A,$10 | Set the collision effects in 8E2C to 10. | |||||
| 9526 | LD ($8E2C),A | |||||||
| 9529 | CALL AccelerateObject | Move the object. | ||||||
| 952C | CALL MoveObject | Update the position of the object. | ||||||
| 952F | LD A,(IX+$04) | Fetch the map zone of the object. | ||||||
| 9532 | CP (IX+$15) | Compare it with the third state byte of the object. | ||||||
| 9535 | JR NZ,UpdateType1E_Flags | Jump to UpdateType1E_Flags if they are different. | ||||||
| 9537 | LD A,(IX+$05) | Fetch the vertical position of the object. | ||||||
| 953A | CP (IX+$16) | Compare it with the fourth state byte of the object. | ||||||
| 953D | JR C,UpdateType1E_Flags | Jump to UpdateType1E_Flags if it is lower. | ||||||
| 953F | SET 4,(IX+$10) | Set bit 4 of the flags of the object. | ||||||
| UpdateType1E_Flags | 9543 | CALL ProcessObjectFlags | Process the flags of the object. | |||||
| 9546 | PUSH HL | Stash HL on the stack. | ||||||
| 9547 | LD HL,($AD46) | Fetch the address of the object from CurrentObject. | ||||||
| 954A | LD A,(HL) | Fetch the type of the object. | ||||||
| 954B | INC A | Increment it. | ||||||
| 954C | JR NZ,UpdateType1E_Finish | Jump to UpdateType1E_Finish if it is in use. | ||||||
| 954E | LD A,($F602) | Fetch the value from F602. | ||||||
| 9551 | INC A | Add one and store it. | ||||||
| 9552 | LD ($F602),A | |||||||
| 9555 | LD BC,$1500 | Set the points to 1500. | ||||||
| 9558 | CALL AddToScore | Add them to the score. | ||||||
| UpdateType1E_Finish | 955B | POP HL | Bring HL back off the stack. | |||||
| 955C | JP UpdateType14_Draw | Jump to UpdateType14_Draw. | ||||||
| Prev: 9507 | Up: Map | Next: 955F |