![]() |
Routines |
| Prev: E787 | Up: Map | Next: E820 |
|
Used by the routines at WriteGameSpriteBuffer and Handler_KeysAndLockedDoors.
Writes one tile and its attribute into the room buffers. Clone of PopulateRoomBuffer.
|
||||||||
| PopulateGameRoomBuffer | E804 | PUSH AF | Stash AF, DE and HL on the stack. | |||||
| E805 | PUSH DE | |||||||
| E806 | PUSH HL | |||||||
| E807 | LD HL,($F330) | Advance *BufferRoomPointer past this tile. | ||||||
| E80A | INC HL | |||||||
| E80B | LD ($F330),HL | |||||||
| E80E | DEC HL | Point back at the tile just claimed. | ||||||
| E80F | LD DE,$A1C4 | Add the room-buffer base at BufferRoom. | ||||||
| E812 | ADD HL,DE | |||||||
| E813 | LD (HL),A | Write the tile ID into the room buffer. | ||||||
| E814 | LD DE,$0320 | Move on to the matching attribute byte. | ||||||
| E817 | ADD HL,DE | |||||||
| E818 | LD A,($5C8F) | A=*ATTR_T. | ||||||
| E81B | LD (HL),A | Write A to *HL. | ||||||
| E81C | POP HL | Restore HL, DE and AF from the stack. | ||||||
| E81D | POP DE | |||||||
| E81E | POP AF | |||||||
| E81F | RET | Return. | ||||||
| Prev: E787 | Up: Map | Next: E820 |