Make screensize() fetch the values dynamically instead of using variables
that are set on startup. This is needed to support the C128, which can switch the screen size at runtime. git-svn-id: svn://svn.cc65.org/cc65/trunk@2042 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -4,27 +4,16 @@
|
||||
; Screen size variables
|
||||
;
|
||||
|
||||
|
||||
.export xsize, ysize
|
||||
.constructor initscrsize
|
||||
.export screensize
|
||||
|
||||
.include "pet.inc"
|
||||
|
||||
.code
|
||||
.proc screensize
|
||||
|
||||
initscrsize:
|
||||
ldx SCR_LINELEN
|
||||
inx ; Variable is one less
|
||||
stx xsize
|
||||
lda #25
|
||||
sta ysize
|
||||
ldy #25
|
||||
rts
|
||||
|
||||
|
||||
.bss
|
||||
|
||||
xsize: .res 1
|
||||
ysize: .res 1
|
||||
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user