![]() ![]() |
Routines |
Prev: 24607 | Up: Map | Next: 24720 |
Used by the routine at LevelNew.
|
||||
DrawPlayArea | 24622 | LD HL,(23606) | Stash CHARS on the stack. | |
24625 | PUSH HL | |||
24626 | LD HL,30422 | Write UDG_Brick to CHARS. | ||
24629 | LD (23606),HL | |||
Create the left-hand wall.
|
||||
24632 | LD DE,24711 | DE=Message_Bricks_LR. | ||
24635 | LD HL,6144 | HL=6144 (screen position). | ||
24638 | LD B,20 | B=20 (counter). | ||
24640 | CALL PrintString_Wrapper | Call PrintString_Wrapper. | ||
Create the right-hand wall.
|
||||
24643 | LD HL,6392 | HL=6392 (screen position). | ||
24646 | LD B,20 | B=20 (counter). | ||
24648 | CALL PrintString_Wrapper | Call PrintString_Wrapper. | ||
Create left-hand cubby-holes.
|
||||
24651 | LD DE,24713 | DE=Message_Bricks_Cubby. | ||
24654 | LD HL,6144 | HL=6144 (screen position). | ||
24657 | CALL 24607 | Call 24607. | ||
Create right-hand cubby-holes.
|
||||
24660 | LD HL,6376 | HL=6376 (screen position). | ||
24663 | CALL 24607 | Call 24607. | ||
Create the floor.
|
||||
24666 | LD HL,47104 | HL=47104 (screen position). | ||
24669 | LD DE,24717 | DE=Message_Floor. | ||
24672 | LD C,16 | C=16 (outer counter). | ||
DrawPlayArea_FloorLoop | 24674 | LD B,1 | B=1 (inner counter). | |
24676 | CALL PrintString_Wrapper | Call PrintString_Wrapper. | ||
24679 | LD A,L | |||
24680 | ADD A,16 | |||
24682 | LD L,A | |||
24683 | LD A,H | |||
24684 | SUB 8 | |||
24686 | LD H,A | |||
24687 | DEC C | Decrease C by one and loop back to DrawPlayArea_FloorLoop until it is zero. | ||
24688 | JR NZ,DrawPlayArea_FloorLoop | |||
24690 | POP HL | Restore CHARS from the stack, and write it back to 23606. | ||
24691 | LD (23606),HL | |||
24694 | RET | Return. | ||
Enables calling PrintString in a loop to reprint a UDG a given number of times using C.
|
||||
PrintString_Wrapper | 24695 | PUSH HL | Stash HL, DE and BC on the stack. | |
24696 | PUSH DE | |||
24697 | PUSH BC | |||
24698 | CALL PrintString | Call PrintString. | ||
24701 | POP BC | Restore BC, DE and HL from the stack. | ||
24702 | POP DE | |||
24703 | POP HL | |||
24704 | LD A,H | Move onto the next . | ||
24705 | ADD A,8 | |||
24707 | LD H,A | |||
24708 | DJNZ PrintString_Wrapper | Decrease counter by one and loop back to PrintString_Wrapper until counter is zero. | ||
24710 | RET | Return. | ||
Screen Data.
|
||||
Message_Bricks_LR | 24711 | DEFB 122,128 | Brick attribute + 1 x brick UDG ID 0+128 (EOL). | |
Message_Bricks_Cubby | 24713 | DEFB 122,0,0,128 | Brick attribute + 3 x brick UDG ID 0+128 (EOL). | |
Message_Floor | 24717 | DEFB 50,1,130 | Floor attribute + UDG ID 1 + UDG ID 2+128 (EOL). |
Prev: 24607 | Up: Map | Next: 24720 |