Mercurial > vba-clojure
comparison clojure/com/aurellem/run/image.clj @ 517:bc24e4d605e9
switched tile and pallette assembly.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 22 Jun 2012 21:25:47 -0500 |
parents | 7eac27143ab9 |
children | bb4434c5a8f3 |
comparison
equal
deleted
inserted
replaced
516:7eac27143ab9 | 517:bc24e4d605e9 |
---|---|
606 (write-data | 606 (write-data |
607 (+ base-address (count A)) | 607 (+ base-address (count A)) |
608 character-data-address | 608 character-data-address |
609 (flatten | 609 (flatten |
610 (map gb-tile->bytes (:tiles gb-image)))) | 610 (map gb-tile->bytes (:tiles gb-image)))) |
611 (select-LCD-bank 1)] | 611 (select-LCD-bank 0)] |
612 B (flatten B) | 612 B (flatten B) |
613 | 613 |
614 | 614 |
615 C [;; [X] specifiy pallets for each character | 615 C [;; [X] write image to the screen in terms of tiles |
616 (write-image | 616 (write-image |
617 (+ base-address (+ (count A) (count B))) | 617 (+ base-address (+ (count A) (count B))) |
618 BG-1-address | 618 BG-1-address |
619 (map second (:data gb-image))) | 619 (map first (:data gb-image))) |
620 (select-LCD-bank 0)] | 620 (select-LCD-bank 1)] |
621 | 621 |
622 C (flatten C) | 622 C (flatten C) |
623 | 623 |
624 D [;; [X] write image to the screen in terms of tiles | 624 D [;; [X] specifiy pallets for each character |
625 (write-image | 625 (write-image |
626 (+ base-address (+ (count A) (count B) (count C))) | 626 (+ base-address (+ (count A) (count B) (count C))) |
627 BG-1-address | 627 BG-1-address |
628 (map first (:data gb-image))) | 628 (map second (:data gb-image))) |
629 | 629 |
630 | 630 |
631 ;; [X] reactivate the LCD display | 631 ;; [X] reactivate the LCD display |
632 ;; we're using only BG images, located at | 632 ;; we're using only BG images, located at |
633 ;; BG-1 (0x9800), with background character data | 633 ;; BG-1 (0x9800), with background character data |