E54E: Draw Room.
RoomDraw |
E54E |
LD A,(Wally_RoomNo) |
|
E551 |
ADD A,A |
|
E552 |
LD E,A |
|
E553 |
LD D,$00 |
|
E555 |
LD HL,RoomData |
|
E558 |
ADD HL,DE |
|
E559 |
LD E,(HL) |
|
E55A |
INC HL |
|
E55B |
LD D,(HL) |
|
E55C |
EX DE,HL |
|
E55D |
LD A,(HL) |
|
E55E |
CP $F5 |
|
E560 |
CALL Z,Draw_CeilingWallFloor |
RoomDraw_0 |
E563 |
LD A,(HL) |
|
E564 |
CP $FF |
|
E566 |
JR Z,RoomDraw_5 |
|
E568 |
CP $F4 |
|
E56A |
JR NZ,RoomDraw_2 |
|
E56C |
LD BC,Tile_DrawFlip |
RoomDraw_1 |
E56F |
LD ($E1E0),BC |
|
E573 |
LD ($E1D8),BC |
|
E577 |
INC HL |
|
E578 |
JR RoomDraw_0 |
RoomDraw_2 |
E57A |
CP $F3 |
|
E57C |
JR NZ,RoomDraw_3 |
|
E57E |
LD BC,TileDraw |
|
E581 |
JR RoomDraw_1 |
RoomDraw_3 |
E583 |
CP $DE |
|
E585 |
JR NZ,RoomDraw_4 |
|
E587 |
INC HL |
|
E588 |
LD C,(HL) |
|
E589 |
INC HL |
|
E58A |
LD B,(HL) |
|
E58B |
INC HL |
|
E58C |
LD A,(BC) |
|
E58D |
OR A |
|
E58E |
JR Z,RoomDraw_5 |
|
E590 |
JR RoomDraw_0 |
RoomDraw_4 |
E592 |
LD E,A |
|
E593 |
INC HL |
|
E594 |
LD D,(HL) |
|
E595 |
INC HL |
|
E596 |
LD A,(HL) |
|
E597 |
INC HL |
|
E598 |
PUSH HL |
|
E599 |
ADD A,A |
|
E59A |
LD C,A |
|
E59B |
LD B,$00 |
|
E59D |
LD HL,FurniturePtrTable |
|
E5A0 |
ADD HL,BC |
|
E5A1 |
LD A,(HL) |
|
E5A2 |
INC HL |
|
E5A3 |
LD H,(HL) |
|
E5A4 |
LD L,A |
|
E5A5 |
CALL FurnitureDraw |
|
E5A8 |
POP HL |
|
E5A9 |
JR RoomDraw_0 |
RoomDraw_5 |
E5AB |
LD A,(Wally_RoomNo) |
|
E5AE |
LD E,A |
|
E5AF |
ADD A,A |
|
E5B0 |
ADD A,E |
|
E5B1 |
LD E,A |
|
E5B2 |
LD D,$00 |
|
E5B4 |
LD HL,Room_ObjSlots |
|
E5B7 |
ADD HL,DE |
|
E5B8 |
LD A,(HL) |
|
E5B9 |
LD (BitmapX),A |
|
E5BC |
INC HL |
|
E5BD |
LD A,(HL) |
|
E5BE |
ADD A,$10 |
|
E5C0 |
LD (BitmapY),A |
|
E5C3 |
INC HL |
|
E5C4 |
LD A,(HL) |
|
E5C5 |
ADD A,$50 |
|
E5C7 |
CALL Bitmap16Draw |
|
E5CA |
RET |