;; Test program that tries to draw a triangle

;; This is a help program for triangle.s to draw the upper triangle

;; We know that (se triangle.inc) and triangle.s
;; The upper triangle has hight AB
;; Its tip is A

;; This triangle has 10 posibol cases, see table bellow
;; ----------------------------------------------------
;; | name left_side               right_side          |
;; ----------------------------------------------------
;; | RR   right-sloaping-steep    right-sloaping-steep|
;; | rR   right-sloaping          right-sloaping-steep|
;; | lR   left-sloaping           right-sloaping-steep|
;; | LR   left-sloaping-steep     right-sloaping-steep|
;; | rr   right-sloaping          right-sloaping      |
;; | lr   left-sloaping           right-sloaping      |
;; | Lr   left-sloaping-steep     right-sloaping      |
;; | ll   left-sloaping           left-sloaping       |
;; | Ll   left-sloaping-sleep     left-sloaping       |
;; | LL   left-sloaping-sleep     left-sloaping-sleep |
;; ----------------------------------------------------

.scope upper_triangle
        ;; Lets for the sake of it say its a lr triangle
        ;; lets also say B is on the left and C is on the right
        ;; we need to compute  V_l, V_r, dy_2_l, dy_2_r, D_l, and D_r

        ;;We need to clear this memory
        LDA #$00
        STA V_l + 1
        STA V_r + 1
        STA dy_2_l + 1
        STA dy_2_l + 1
        STA $FD ; for pixel_draw

        ;; ..
.endscope