![]() |
Routines |
| Prev: EBDE | Up: Map | Next: EC3A |
|
Used by the routine at Place_Guardian.
Puts the rock formation of the type 88 (see Handle_Rock_Formation) in the room of a guardian, if the room is a cave.
The four object records that start at Object_Record_8 are cleared. The third one, at Object_Record_10, becomes the rock formation and has bit 0 of its redraw flags set, so that it is drawn.
|
||||
| Place_Rock_Formation | EC1C | LD A,($8F1E) | Fetch the room y of Sabreman. | |
| EC1F | CP $10 | Return if the room is a special room (the room y is below 10). | ||
| EC21 | RET C | |||
| EC22 | LD HL,$8F7A | Point HL at Object_Record_8. | ||
| EC25 | LD DE,$0010 | Set the size of a record in DE. | ||
| EC28 | LD B,$04 | Set the number of records to clear to 04. | ||
| Place_Rock_Formation_Clear | EC2A | LD (HL),$00 | Clear the type of the record, which removes the object. | |
| EC2C | ADD HL,DE | Move on to the next record. | ||
| EC2D | DJNZ Place_Rock_Formation_Clear | Loop back until all four records have been cleared. | ||
| EC2F | LD A,$88 | Set the type of the third record to 88. | ||
| EC31 | LD ($8F9A),A | Store the type in the record. | ||
| EC34 | LD A,$01 | Set bit 0 of the redraw flags. | ||
| EC36 | LD ($8FA9),A | Store the flags in the third record. | ||
| EC39 | RET | Return. | ||
| Prev: EBDE | Up: Map | Next: EC3A |