Routines |
Prev: 601F | Up: Map | Next: 6090 |
Used by the routine at LevelNew.
|
||||
DrawPlayArea | 602E | LD HL,($5C36) | Stash CHARS on the stack. | |
6031 | PUSH HL | |||
6032 | LD HL,$76D6 | Write UDG_Brick to CHARS. | ||
6035 | LD ($5C36),HL | |||
Create the left-hand wall.
|
||||
6038 | LD DE,$6087 | DE=Message_Bricks_LR. | ||
603B | LD HL,$1800 | HL=1800 (screen position). | ||
603E | LD B,$14 | B=14 (counter). | ||
6040 | CALL PrintString_Wrapper | Call PrintString_Wrapper. | ||
Create the right-hand wall.
|
||||
6043 | LD HL,$18F8 | HL=18F8 (screen position). | ||
6046 | LD B,$14 | B=14 (counter). | ||
6048 | CALL PrintString_Wrapper | Call PrintString_Wrapper. | ||
Create left-hand cubby-holes.
|
||||
604B | LD DE,$6089 | DE=Message_Bricks_Cubby. | ||
604E | LD HL,$1800 | HL=1800 (screen position). | ||
6051 | CALL $601F | Call 601F. | ||
Create right-hand cubby-holes.
|
||||
6054 | LD HL,$18E8 | HL=18E8 (screen position). | ||
6057 | CALL $601F | Call 601F. | ||
Create the floor.
|
||||
605A | LD HL,$B800 | HL=B800 (screen position). | ||
605D | LD DE,$608D | DE=Message_Floor. | ||
6060 | LD C,$10 | C=10 (outer counter). | ||
DrawPlayArea_FloorLoop | 6062 | LD B,$01 | B=01 (inner counter). | |
6064 | CALL PrintString_Wrapper | Call PrintString_Wrapper. | ||
6067 | LD A,L | |||
6068 | ADD A,$10 | |||
606A | LD L,A | |||
606B | LD A,H | |||
606C | SUB $08 | |||
606E | LD H,A | |||
606F | DEC C | Decrease C by one and loop back to DrawPlayArea_FloorLoop until it is zero. | ||
6070 | JR NZ,DrawPlayArea_FloorLoop | |||
6072 | POP HL | Restore CHARS from the stack, and write it back to 5C36. | ||
6073 | LD ($5C36),HL | |||
6076 | RET | Return. | ||
Enables calling PrintString in a loop to reprint a UDG a given number of times using C.
|
||||
PrintString_Wrapper | 6077 | PUSH HL | Stash HL, DE and BC on the stack. | |
6078 | PUSH DE | |||
6079 | PUSH BC | |||
607A | CALL PrintString | Call PrintString. | ||
607D | POP BC | Restore BC, DE and HL from the stack. | ||
607E | POP DE | |||
607F | POP HL | |||
6080 | LD A,H | Move onto the next . | ||
6081 | ADD A,$08 | |||
6083 | LD H,A | |||
6084 | DJNZ PrintString_Wrapper | Decrease counter by one and loop back to PrintString_Wrapper until counter is zero. | ||
6086 | RET | Return. | ||
Screen Data.
|
||||
Message_Bricks_LR | 6087 | DEFB $7A,$80 | Brick attribute + 1 x brick UDG ID 00+80 (EOL). | |
Message_Bricks_Cubby | 6089 | DEFB $7A,$00,$00,$80 | Brick attribute + 3 x brick UDG ID 00+80 (EOL). | |
Message_Floor | 608D | DEFB $32,$01,$82 | Floor attribute + UDG ID 01 + UDG ID 02+80 (EOL). |
Prev: 601F | Up: Map | Next: 6090 |