# HG changeset patch # User Robert McIntyre # Date 1346487313 18000 # Node ID d2d41ecc88e0f709578bbd67cd089c54f1ce7f67 # Parent dba6bb38d2fbd19dd536a446a910a3db0bf1aa37 added skeleton for clear-screen. diff -r dba6bb38d2fb -r d2d41ecc88e0 clojure/com/aurellem/run/adv_choreo.clj --- a/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:09:31 2012 -0500 +++ b/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:15:13 2012 -0500 @@ -177,8 +177,7 @@ display-glyph - (let [init - + (let [init* (flatten [0xF1 ;; pop A, now A is equal to key input ;; BC is current number of glyphs rendered. @@ -197,13 +196,20 @@ 0x2A 0x57 ;; row -> D 0x2A 0x5F ;; column -> E - - + ;; clear screen if we are at 0,0 + 0x57 0xB3 ;; D->A, OR E A ==> (= D E 0) + 0x20 ;; skip clear-screen if D and E are not both zero + :clear-screen-length ]) clear-screen + (flatten + [0 0 0]) - []] + init (replace + {:clear-screen-length (count clear-screen)} init*) + ] + (concat init clear-screen))