Start of TGI changes. Untested, may not work.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4404 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-10-30 21:26:35 +00:00
parent 7b8fbb31da
commit 763fe0b802
10 changed files with 180 additions and 122 deletions

View File

@@ -7,15 +7,41 @@
.include "tgi-kernel.inc"
.import popax
.import popax, negax
.importzp ptr3
.proc _tgi_outtext
sta ptr3
stx ptr3+1 ; Save s
stx ptr3+1 ; Pass s in ptr3 to driver
pha
txa
pha ; Save s on stack for later
jsr tgi_curtoxy ; Copy curx/cury into ptr1/ptr2
jmp tgi_outtext ; Call the driver
jsr tgi_outtext ; Call the driver
pla
tax
pla ; Restore s
jsr _tgi_textwidth ; Get width of text string
ldy _tgi_textdir ; Horizontal or vertical text?
beq @L1 ; Jump if horizontal
; Move graphics cursor for vertical text
jsr negax
ldy #2 ; Point to _tgi_cury
; Move graphics cursor for horizontal text
@L1: clc
adc _tgi_curx,y
sta _tgi_curx,y
txa
adc _tgi_curx+1,y
sta _tgi_curx+1,y
rts
.endproc