diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2008-11-12 03:57:32 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2008-11-12 03:57:32 +0000 |
commit | d42041043b95617244ffdb9150c5e2f2720a8a83 (patch) | |
tree | 71acbd2f8d8d51423d29ddbb2349ed23f77c3151 /apps/plugins/rockboy/lcd.c | |
parent | 68c686957b1b62671d727116e5c167cd8f080148 (diff) | |
download | rockbox-d42041043b95617244ffdb9150c5e2f2720a8a83.tar.gz rockbox-d42041043b95617244ffdb9150c5e2f2720a8a83.zip |
Add in the needed crt0.S code for the wakeup alarm also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19094 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/lcd.c')
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index da3b138e51..f62e3a9ce3 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c | |||
@@ -64,7 +64,7 @@ fb_data *vdest; | |||
64 | static void updatepatpix(void) ICODE_ATTR; | 64 | static void updatepatpix(void) ICODE_ATTR; |
65 | static void updatepatpix(void) | 65 | static void updatepatpix(void) |
66 | { | 66 | { |
67 | int i, j; | 67 | int i; |
68 | #if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE)) | 68 | #if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE)) |
69 | int k, a, c; | 69 | int k, a, c; |
70 | #endif | 70 | #endif |
@@ -73,10 +73,12 @@ static void updatepatpix(void) | |||
73 | if (!anydirty) return; | 73 | if (!anydirty) return; |
74 | for (i = 0; i < 1024; i++) | 74 | for (i = 0; i < 1024; i++) |
75 | { | 75 | { |
76 | int j; | ||
76 | if (i == 384) i = 512; | 77 | if (i == 384) i = 512; |
77 | if (i == 896) break; | 78 | if (i == 896) break; |
78 | if (!patdirty[i]) continue; | 79 | if (!patdirty[i]) continue; |
79 | patdirty[i] = 0; | 80 | patdirty[i] = 0; |
81 | |||
80 | for (j = 0; j < 8; j++) | 82 | for (j = 0; j < 8; j++) |
81 | { | 83 | { |
82 | #if CONFIG_CPU == SH7034 | 84 | #if CONFIG_CPU == SH7034 |
@@ -376,8 +378,8 @@ static void tilebuf(void) | |||
376 | int base; | 378 | int base; |
377 | byte *tilemap, *attrmap; | 379 | byte *tilemap, *attrmap; |
378 | int *tilebuf; | 380 | int *tilebuf; |
379 | int *wrap; | 381 | const int *wrap; |
380 | static int wraptable[64] = | 382 | static const int wraptable[64] ICONST_ATTR = |
381 | { | 383 | { |
382 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, | 384 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, |
383 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32 | 385 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32 |
@@ -778,11 +780,11 @@ static void spr_enum(void) | |||
778 | static void spr_scan(void) ICODE_ATTR; | 780 | static void spr_scan(void) ICODE_ATTR; |
779 | static void spr_scan(void) | 781 | static void spr_scan(void) |
780 | { | 782 | { |
781 | int i, x; | 783 | int i; |
782 | byte pal, b, ns = NS; | 784 | byte ns = NS; |
783 | byte *src, *dest, *bg, *pri; | 785 | byte *src, *dest; |
784 | struct vissprite *vs; | 786 | struct vissprite *vs; |
785 | static byte bgdup[256]; | 787 | static byte bgdup[256] IBSS_ATTR; |
786 | 788 | ||
787 | if (!ns) return; | 789 | if (!ns) return; |
788 | 790 | ||
@@ -791,7 +793,8 @@ static void spr_scan(void) | |||
791 | 793 | ||
792 | for (; ns; ns--, vs--) | 794 | for (; ns; ns--, vs--) |
793 | { | 795 | { |
794 | x = vs->x; | 796 | int x = vs->x; |
797 | |||
795 | if (x > 159) continue; | 798 | if (x > 159) continue; |
796 | if (x < -7) continue; | 799 | if (x < -7) continue; |
797 | if (x < 0) | 800 | if (x < 0) |
@@ -807,23 +810,25 @@ static void spr_scan(void) | |||
807 | if (x > 152) i = 160 - x; | 810 | if (x > 152) i = 160 - x; |
808 | else i = 8; | 811 | else i = 8; |
809 | } | 812 | } |
810 | pal = vs->pal; | 813 | |
814 | byte pal = vs->pal; | ||
815 | |||
811 | if (vs->pri) | 816 | if (vs->pri) |
812 | { | 817 | { |
813 | bg = bgdup + (dest - BUF); | 818 | byte *bg = bgdup + (dest - BUF); |
814 | while (i--) | 819 | while (i--) |
815 | { | 820 | { |
816 | b = src[i]; | 821 | byte b = src[i]; |
817 | if (b && !(bg[i]&3)) dest[i] = pal|b; | 822 | if (b && !(bg[i]&3)) dest[i] = pal|b; |
818 | } | 823 | } |
819 | } | 824 | } |
820 | else if (hw.cgb) | 825 | else if (hw.cgb) |
821 | { | 826 | { |
822 | bg = bgdup + (dest - BUF); | 827 | byte *bg = bgdup + (dest - BUF); |
823 | pri = PRI + (dest - BUF); | 828 | byte *pri = PRI + (dest - BUF); |
824 | while (i--) | 829 | while (i--) |
825 | { | 830 | { |
826 | b = src[i]; | 831 | byte b = src[i]; |
827 | if (b && (!pri[i] || !(bg[i]&3))) | 832 | if (b && (!pri[i] || !(bg[i]&3))) |
828 | dest[i] = pal|b; | 833 | dest[i] = pal|b; |
829 | } | 834 | } |