0 Members and 2 Guests are viewing this topic.
;Monospaced text;inputs: penRow=y, penCol=x, hl=pointer to null (0) terminated textDrawMonospaceString: ld a, (hl) inc hl cp '\n' jr z, monoWrapLine cp '\r' jr z, monoWrapLine cp '\t' jr z,monoTab or a ret z push af ld a,(penCol) ld b,a pop af push bc b_call _VPutMap pop bc ld a,b add a,6 ld (penCol),a cp 92 jr nc,monoWrapLine jr DrawMonospaceStringmonoTab: ld a,(penCol) add a,12 ld (penCol),a cp 55 call nc,Newline jr DrawMonospaceStringmonoWrapLine: call Newline jr DrawMonospaceString;newline, wrapps screen if necessary;preserves afNewline: push af xor a ld (penCol),a ld a,(penRow) add a, 6 cp 55 jr nc,NewLine_top ld (penRow),a pop af retNewLine_top: xor a ld (penRow),a pop af ret
Menu: .db "Menu",0,2 .db "Item 1",0 .db "Item 2",0 .dw Item_1_goto .dw Item_2_goto .dw clear_button_goto