2 ; Oliver Schmidt, 10.03.2004
4 ; void __fastcall__ textframexy (unsigned char x, unsigned char y,
5 ; unsigned char width, unsigned char height,
6 ; unsigned char style);
7 ; void __fastcall__ textframe (unsigned char width, unsigned char height,
8 ; unsigned char style);
11 .export _textframexy, _textframe
12 .import popa, pusha, _gotoxy
13 .import chlinedirect, cvlinedirect
15 .include "zeropage.inc"
30 phx ; Save character display mode
32 stx INVFLG ; Set normal character display mode
49 bpl :+ ; Relative to left edge?
55 bpl :+ ; Relative to top?
58 jsr _gotoxy ; Call this one, will pop params
61 lsr ; Get bit 0 (vline) into carry
72 next: plx ; Restore index
78 sta INVFLG ; Restore character display mode
83 ; 2 styles with 4 lines each make up 8 entries per table
84 ; - even entry numbers mean horizontal lines
85 ; - odd entry numbers mean vertical lines
87 ; x offset for the line starting point
88 ; - a positive value means relative to the frame left edge
89 ; - a negative value menas relative to the frame right edge
90 XOFFS: .byte 0, 0, 0, -2, 1, 0, 1, -2
92 ; y offset for the line starting point
93 ; - a positive value means relative to the frame top
94 ; - a negative value menas relative to the frame bottom
95 YOFFS: .byte 0, 1, -2, 1, 0, 0, -2, 0
97 ; length of the line relative to the frame size
98 ; - a negative value for hlines means shorter than the width
99 ; - a negative value for vlines menas shorter than the height
100 LENGTH: .byte 0, -2, 0, -2, -2, 0, -2, 0
102 ; character to use for drawing the line
103 ; - hibit set means normal printable character
104 ; - hibit clear means MouseText character
105 CHAR: .byte '_'|$80, '_', 'L', 'Z', 'L', 'Z', '_'|$80, '_'