![]() |
Routines |
| Prev: 60382 | Up: Map | Next: 60474 |
|
Used by the routine at Place_Guardian.
Puts the rock formation of the type 136 (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 | 60444 | LD A,(36638) | Fetch the room y of Sabreman. | |
| 60447 | CP 16 | Return if the room is a special room (the room y is below 16). | ||
| 60449 | RET C | |||
| 60450 | LD HL,36730 | Point HL at Object_Record_8. | ||
| 60453 | LD DE,16 | Set the size of a record in DE. | ||
| 60456 | LD B,4 | Set the number of records to clear to 4. | ||
| Place_Rock_Formation_Clear | 60458 | LD (HL),0 | Clear the type of the record, which removes the object. | |
| 60460 | ADD HL,DE | Move on to the next record. | ||
| 60461 | DJNZ Place_Rock_Formation_Clear | Loop back until all four records have been cleared. | ||
| 60463 | LD A,136 | Set the type of the third record to 136. | ||
| 60465 | LD (36762),A | Store the type in the record. | ||
| 60468 | LD A,1 | Set bit 0 of the redraw flags. | ||
| 60470 | LD (36777),A | Store the flags in the third record. | ||
| 60473 | RET | Return. | ||
| Prev: 60382 | Up: Map | Next: 60474 |