![]() |
Routines |
| Prev: 59271 | Up: Map | Next: 59424 |
|
Used by the routines at WriteGameSpriteBuffer and Handler_KeysAndLockedDoors.
Writes one tile and its attribute into the room buffers. Clone of PopulateRoomBuffer.
|
||||||||
| PopulateGameRoomBuffer | 59396 | PUSH AF | Stash AF, DE and HL on the stack. | |||||
| 59397 | PUSH DE | |||||||
| 59398 | PUSH HL | |||||||
| 59399 | LD HL,(62256) | Advance *BufferRoomPointer past this tile. | ||||||
| 59402 | INC HL | |||||||
| 59403 | LD (62256),HL | |||||||
| 59406 | DEC HL | Point back at the tile just claimed. | ||||||
| 59407 | LD DE,41412 | Add the room-buffer base at BufferRoom. | ||||||
| 59410 | ADD HL,DE | |||||||
| 59411 | LD (HL),A | Write the tile ID into the room buffer. | ||||||
| 59412 | LD DE,800 | Move on to the matching attribute byte. | ||||||
| 59415 | ADD HL,DE | |||||||
| 59416 | LD A,(23695) | A=*ATTR_T. | ||||||
| 59419 | LD (HL),A | Write A to *HL. | ||||||
| 59420 | POP HL | Restore HL, DE and AF from the stack. | ||||||
| 59421 | POP DE | |||||||
| 59422 | POP AF | |||||||
| 59423 | RET | Return. | ||||||
| Prev: 59271 | Up: Map | Next: 59424 |