Routines |
Prev: 47532 | Up: Map | Next: 47611 |
Write the current room ID for referring back to.
|
||||
Draw_Characters_CurrentRoom | 47574 | LD A,(IY+15) | Write the current room (IY+15) to TempStore_Room. | |
47577 | LD (47441),A | |||
There are five characters, cycle through each of them in reverse.
|
||||
47580 | LD B,5 | B=5 (counter). | ||
Store the current character reference so it isn't corrupted.
|
||||
47582 | PUSH IY | Stash IY on the stack. | ||
Starting at the end with Harry.
|
||||
47584 | LD IY,48235 | IY=FrameId_Harry. | ||
Draw_Characters_CurrentRoom_Loop | 47588 | PUSH BC | Stash the counter in BC on the stack. | |
Don't draw the character if they're not in the current room.
|
||||
47589 | LD A,(47441) | A=*TempStore_Room. | ||
47592 | CP (IY+15) | If A is not equal to the current room (*IY+15) jump to Draw_Characters_CurrentRoom_Skip. | ||
47595 | JR NZ,Draw_Characters_CurrentRoom_Skip | |||
Draw the character in the shadow buffer as they are in the room with our current character.
|
||||
47597 | CALL WriteSprite_ShadowBuffer | Call WriteSprite_ShadowBuffer. | ||
Move onto the next character.
|
||||
Draw_Characters_CurrentRoom_Skip | 47600 | DEC IY | Decrease IY by one. | |
47602 | POP BC | Restore the counter (BC) from the stack. | ||
47603 | DJNZ Draw_Characters_CurrentRoom_Loop | Decrease counter by one and loop back to Draw_Characters_CurrentRoom_Loop until counter is zero. | ||
Restores the current character pointer to IY.
|
||||
47605 | POP IY | Restore IY from the stack. | ||
Update the screen buffer and return.
|
||||
47607 | CALL ShadowBufferToScreen | Call ShadowBufferToScreen. | ||
47610 | RET | Return. |
Prev: 47532 | Up: Map | Next: 47611 |