diff --git a/desk.acc/a2d.inc b/desk.acc/a2d.inc index d15e3d6..7a260cd 100644 --- a/desk.acc/a2d.inc +++ b/desk.acc/a2d.inc @@ -354,6 +354,9 @@ A2D_CWS_SCROLL_THUMB := 1 << 6 A2D_CWS_SCROLL_TRACK := 1 << 0 A2D_CWS_SCROLL_NORMAL := A2D_CWS_SCROLL_ENABLED | A2D_CWS_SCROLL_THUMB | A2D_CWS_SCROLL_TRACK +;;; Used in various state blocks +A2D_DEFAULT_MSKAND := $FF +A2D_DEFAULT_MSKOR := $00 ;;; ================================================== ;;; Macros diff --git a/desk.acc/calculator.s b/desk.acc/calculator.s index 0ff744f..056adb5 100644 --- a/desk.acc/calculator.s +++ b/desk.acc/calculator.s @@ -747,8 +747,8 @@ voffset:.word 0 width: .word window_width height: .word window_height pattern:.res 8, $FF -mskand: .byte $FF -mskor: .byte $00 +mskand: .byte A2D_DEFAULT_MSKAND +mskor: .byte A2D_DEFAULT_MSKOR .byte 0,0,0,0 ; ??? hthick: .byte 1 vthick: .byte 1 diff --git a/desk.acc/date.s b/desk.acc/date.s index 7b8de2c..87bf8f3 100644 --- a/desk.acc/date.s +++ b/desk.acc/date.s @@ -265,8 +265,8 @@ h1: .word 100 w2: .word $1F4 h2: .word $1F4 .proc box -left: .word $B4 -top: .word $32 +left: .word 180 +top: .word 50 saddr: .addr A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE hoff: .word 0 @@ -275,8 +275,8 @@ width: .word $C7 height: .word $40 .endproc pattern:.res 8,$00 -mskand: .byte $FF -mskor: .byte $00 +mskand: .byte A2D_DEFAULT_MSKAND +mskor: .byte A2D_DEFAULT_MSKOR .byte $00,$00,$00,$00 hthick: .byte 4 vthick: .byte 2 diff --git a/desk.acc/puzzle.s b/desk.acc/puzzle.s index c56d9e3..32ff4fc 100644 --- a/desk.acc/puzzle.s +++ b/desk.acc/puzzle.s @@ -609,8 +609,8 @@ width: .word default_width height: .word default_height pattern:.res 8, $FF -mskand: .byte $FF -mskor: .byte $00 +mskand: .byte A2D_DEFAULT_MSKAND +mskor: .byte A2D_DEFAULT_MSKOR .byte 0,0,0,0 hthick: .byte 1 vthick: .byte 1 @@ -628,8 +628,8 @@ voffset:.word 0 width: .word default_width height: .word default_height pattern:.res 8, $FF -mskand: .byte $FF -mskor: .byte $00 +mskand: .byte A2D_DEFAULT_MSKAND +mskor: .byte A2D_DEFAULT_MSKOR .byte 0,0,0,0 hthick: .byte 1 vthick: .byte 1 diff --git a/desk.acc/show_image_file.s b/desk.acc/show_image_file.s index 55f9ef6..57b1079 100644 --- a/desk.acc/show_image_file.s +++ b/desk.acc/show_image_file.s @@ -231,15 +231,15 @@ left: .word default_left top: .word default_top addr: .word A2D_SCREEN_ADDR stride: .word A2D_SCREEN_STRIDE -hoffset:.word 0 ; Also used for A2D_CLEAR_BOX +hoffset:.word 0 voffset:.word 0 width: .word default_width height: .word default_height .endproc -pattern:.byte $00,$00,$00,$00,$00,$00,$00,$00 -mskand: .byte $FF -mskor: .byte $00 +pattern:.res 8, 0 +mskand: .byte A2D_DEFAULT_MSKAND +mskor: .byte A2D_DEFAULT_MSKOR .byte $00,$00,$00,$00 hthick: .byte 1 vthick: .byte 1 diff --git a/desk.acc/show_text_file.s b/desk.acc/show_text_file.s index f4875bb..18d2044 100644 --- a/desk.acc/show_text_file.s +++ b/desk.acc/show_text_file.s @@ -36,7 +36,7 @@ call_main_addr := call_main_trampoline+7 ; address patched in her .scope sta RAMWRTON sta RAMRDON - ldx #(call_main_template_end - call_main_template) + ldx #sizeof_call_main_template loop: lda call_main_template,x sta call_main_trampoline,x dex @@ -52,8 +52,7 @@ loop: lda call_main_template,x sta RAMWRTON rts .endproc -call_main_template_end: ; can't .sizeof(proc) before declaration - ;; https://github.com/cc65/cc65/issues/478 + sizeof_call_main_template := * - call_main_template .proc call_init ;; run the DA @@ -309,14 +308,13 @@ hsmax: .byte 32 hspos: .byte 0 vsmax: .byte 255 vspos: .byte 0 + .byte 0, 0 ; ??? +w1: .word 200 +h1: .word 51 +w2: .word default_width +h2: .word default_height - ;; ??? - .byte $00,$00,$C8,$00,$33,$00 - -width: .word default_width -height: .word default_height - -.proc box ; or whole window ?? +.proc box left: .word default_left top: .word default_top addr: .word A2D_SCREEN_ADDR @@ -328,8 +326,8 @@ height: .word default_height .endproc pattern:.res 8, $00 -mskand: .byte $FF -mskor: .byte $00 +mskand: .byte A2D_DEFAULT_MSKAND +mskor: .byte A2D_DEFAULT_MSKOR .byte $00,$00,$00,$00 hthick: .byte 1 vthick: .byte 1