-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtext.inc
81 lines (69 loc) · 836 Bytes
/
text.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
; Syntax text_drawString "string"
.macro text_drawString
phy
phx
php
XY16
ldy #drawstring_str\@
jsr text_print
jmp skip\@
drawstring_str\@:
.db \1,0
skip\@:
plp
plx
ply
.endm
; Syntax test_drawStringXY "string" X Y
.macro text_drawStringXY
phy
phx
php
XY16
ldx #\2
ldy #\3
jsr text_gotoxy
ldy #@drawstring_strn\@
jsr text_print
jmp @skipn\@
@drawstring_strn\@:
.db \1,0
@skipn\@:
plp
plx
ply
.endm
; Syntax text_drawBox x y w h
.macro text_drawBox
pha
php
A16
lda #\1
sta text_box_x
lda #\2
sta text_box_y
lda #\3
sta text_box_w
lda #\4
sta text_box_h
jsr text_drawBox
plp
pla
.endm
; Syntax text_clearBox x y w h
.macro text_clearBox
pha
php
A16
lda #\1
sta text_box_x
lda #\2
sta text_box_y
lda #\3
sta text_box_w
lda #\4
sta text_box_h
jsr text_clearBox
plp
pla
.endm