2002-03-08 16:49:31 +00:00
|
|
|
;
|
|
|
|
; Maciej 'YTM/Elysium' Witkowiak
|
|
|
|
;
|
|
|
|
; 06.03.2002
|
|
|
|
|
|
|
|
; void cvlinexy (unsigned char x, unsigned char y, unsigned char length);
|
|
|
|
; void cvline (unsigned char length);
|
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
.export _cvlinexy, _cvline
|
|
|
|
.import popa, _gotoxy, fixcursor
|
|
|
|
.importzp cursor_x, cursor_y, cursor_r
|
|
|
|
|
2012-01-31 20:49:58 +00:00
|
|
|
.include "jumptab.inc"
|
|
|
|
.include "geossym.inc"
|
2002-03-08 16:49:31 +00:00
|
|
|
|
|
|
|
_cvlinexy:
|
2012-02-08 15:23:45 +00:00
|
|
|
pha ; Save the length
|
|
|
|
jsr popa ; Get y
|
|
|
|
jsr _gotoxy ; Call this one, will pop params
|
2002-03-08 16:49:31 +00:00
|
|
|
pla ; Restore the length
|
|
|
|
|
2012-02-08 15:23:45 +00:00
|
|
|
_cvline:
|
|
|
|
cmp #0 ; Is the length zero?
|
|
|
|
beq L9 ; Jump if done
|
2002-03-08 16:49:31 +00:00
|
|
|
tax
|
2012-02-08 15:23:45 +00:00
|
|
|
lda cursor_x ; x position
|
2002-03-08 16:49:31 +00:00
|
|
|
clc
|
2012-02-08 15:23:45 +00:00
|
|
|
adc #4 ; in the middle of cell
|
|
|
|
sta r4L
|
|
|
|
lda cursor_x+1
|
|
|
|
adc #0
|
|
|
|
sta r4L+1
|
|
|
|
lda cursor_y ; top start
|
|
|
|
sta r3L
|
2002-03-08 16:49:31 +00:00
|
|
|
txa ; bottom end
|
|
|
|
clc
|
2012-02-08 15:23:45 +00:00
|
|
|
adc cursor_r
|
|
|
|
sta cursor_r
|
|
|
|
sta r3H
|
|
|
|
asl r3H
|
|
|
|
asl r3H
|
|
|
|
asl r3H
|
|
|
|
lda #%11111111 ; pattern
|
|
|
|
jsr VerticalLine
|
|
|
|
jsr fixcursor
|
2002-03-08 16:49:31 +00:00
|
|
|
L9: rts
|