Hold the maximum X and Y coordinate in variables instead of calculating them
when needed. The variables make signed compares in the line clipper easier. git-svn-id: svn://svn.cc65.org/cc65/trunk@4450 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -8,9 +8,13 @@
|
||||
.include "tgi-kernel.inc"
|
||||
.include "tgi-error.inc"
|
||||
|
||||
.import pushax, pusha
|
||||
.import pushax, pusha, decax1
|
||||
.importzp ptr1
|
||||
|
||||
|
||||
;----------------------------------------------------------------------------
|
||||
|
||||
.code
|
||||
.proc _tgi_init
|
||||
|
||||
jsr _tgi_done ; Switch off graphics if needed
|
||||
@@ -22,6 +26,18 @@
|
||||
|
||||
inc _tgi_gmode ; Remember that graph mode is active
|
||||
|
||||
; Get the maximum X and Y coordinate
|
||||
|
||||
jsr _tgi_getxres
|
||||
jsr decax1
|
||||
sta _tgi_xmax
|
||||
stx _tgi_xmax+1
|
||||
|
||||
jsr _tgi_getyres
|
||||
jsr decax1
|
||||
sta _tgi_ymax
|
||||
stx _tgi_ymax+1
|
||||
|
||||
; Do driver initialization. Set draw and view pages.
|
||||
|
||||
lda #0
|
||||
|
||||
Reference in New Issue
Block a user