![]() |
Routines |
| Prev: 49714 | Up: Map | Next: 49780 |
|
Used by the routine at HandleObjectDroppedInCauldron.
Handles an object that has been dropped in the cauldron once it is at the centre of the room. If it is above the cauldron it is flagged to be ignored in the 3D calculations and left to fall. When it has dropped to the bottom the object is added to the cauldron.
|
||||||||
| HandleObjectAtCentreOfRoom | 49720 | LD A,128 | Set A to the height of the bottom of the cauldron. | |||||
| 49722 | CP (IX+3) | Compare it with the Z coordinate of the object. | ||||||
| 49725 | JR NC,AddObjectToCauldron | Jump to AddObjectToCauldron if the object is at the bottom of the cauldron. | ||||||
| 49727 | SET 1,(IX+7) | Flag the object to be ignored in the 3D calculations. | ||||||
| 49731 | JR HandleObjectDroppedInCauldron_Move | Jump to HandleObjectDroppedInCauldron_Move to let it fall. | ||||||
|
The object is in the cauldron. If it is the one that is needed next, count it and show that something happens.
|
||||||||
| AddObjectToCauldron | 49733 | LD (IX+3),128 | Set the Z coordinate of the object to the height of the bottom of the cauldron. | |||||
| 49737 | CALL FindNextObjectRequired | Find the number of the object that is needed next. | ||||||
| 49740 | LD A,(IX+0) | Fetch the graphic number of the object. | ||||||
| 49743 | AND %00000111 | Convert it to the number of the object. | ||||||
| 49745 | CP (HL) | Compare it with the number that is needed. | ||||||
| 49746 | JR NZ,AddObjectToCauldron_Remove | Jump to AddObjectToCauldron_Remove if it is not the one that is needed. | ||||||
| 49748 | LD HL,23483 | Point HL at Charms. | ||||||
| 49751 | INC (HL) | Count one more. | ||||||
| 49752 | CALL CycleColoursWithSound | Make the colours of the screen cycle. | ||||||
| 49755 | LD A,(23483) | Fetch the number of charms in the cauldron from Charms. | ||||||
| 49758 | CP 14 | Jump to AddObjectToCauldron_Remove if there are more to come. | ||||||
| 49760 | JR NZ,AddObjectToCauldron_Remove | |||||||
| 49762 | CALL PrepareFinalAnimation | Start the final animation. | ||||||
|
Remove the object.
|
||||||||
| AddObjectToCauldron_Remove | 49765 | XOR A | Clear A. | |||||
| 49766 | LD (23492),A | Flag that no object is being put into the cauldron at ObjectInCauldronFlag. | ||||||
| 49769 | LD L,(IX+16) | Fetch the low byte of the address of the table entry that the object comes from. | ||||||
| 49772 | LD H,(IX+17) | Fetch the high byte. | ||||||
| 49775 | LD (HL),0 | Clear the graphic number of the table entry. | ||||||
| 49777 | JP HandleRepelSpell_Vanish | Jump to HandleRepelSpell_Vanish to remove the object. | ||||||
| Prev: 49714 | Up: Map | Next: 49780 |