![]() |
Routines |
| Prev: 52482 | Up: Map | Next: 52568 |
|
The routine for objects of type 152 to 157, the pieces of the title graphic that are shown during the ending. Each piece stays where it was placed. It is drawn, and its attributes are set to bright white.
The large piece (type 152) is the last piece in the object table, and waits for the ghosts before it: when the object before it has gone, the ending is over and the game starts again.
|
|||||
| UpdateLogoPiece | 52496 | LD A,(IX-16) | Jump to UpdateLogoPiece_Finished if the object before this one has gone, which means the ending is over. | ||
| 52499 | AND A | ||||
| 52500 | JR Z,UpdateLogoPiece_Finished | ||||
|
The smaller pieces start here, as they do not wait.
|
|||||
| UpdateLogoPiece_Small | 52502 | LD A,71 | Use bright white ink (attribute 71). | ||
| 52504 | LD (48128),A | ||||
|
This entry point is used by the routine at UpdateEndingGhost.
Draw the piece, and set its attributes.
|
|||||
| UpdateLogoPiece_Draw | 52507 | LD A,(IX+10) | Copy the X and Y position of the piece (kept where the velocities usually are) into the position of the sprite. | ||
| 52510 | LD (IX+14),A | ||||
| 52513 | LD A,(IX+11) | ||||
| 52516 | LD (IX+15),A | ||||
| 52519 | CALL DrawSprite | Draw the sprite. | |||
| 52522 | LD L,(IX+14) | Fetch the screen position of the sprite. | |||
| 52525 | LD H,(IX+15) | ||||
| 52528 | CALL CalculateAttributeAddress | Turn the position into an address in the attribute buffer. | |||
| 52531 | LD A,(48067) | Fetch the number of rows of the sprite that were drawn. | |||
| 52534 | LD C,A | ||||
| 52535 | LD A,(IX+11) | Add the position of the sprite within a character cell and 5, to get the height of the sprite in pixels. | |||
| 52538 | AND 7 | ||||
| 52540 | ADD A,C | ||||
| 52541 | ADD A,5 | ||||
| 52543 | RRCA | Divide by eight to get the height in characters. | |||
| 52544 | RRCA | ||||
| 52545 | RRCA | ||||
| 52546 | AND 31 | ||||
| 52548 | LD C,A | ||||
| 52549 | LD A,(48066) | Fetch the width of the sprite in characters. | |||
| 52552 | LD B,A | ||||
| 52553 | LD A,(48128) | Fetch the attribute. | |||
| 52556 | JP FillAttributeRectangle | Jump to FillAttributeRectangle. | |||
|
The ending is over.
|
|||||
| UpdateLogoPiece_Finished | 52559 | LD DE,51226 | Play the tune for completing the game, and start a new game. | ||
| 52562 | CALL PlayMusic | ||||
| 52565 | JP StartGame_KeepSettings | ||||
| Prev: 52482 | Up: Map | Next: 52568 |