diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2008-11-12 04:15:34 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2008-11-12 04:15:34 +0000 |
commit | 59d4d2025c9f1b0a68b780fe6a6f0e313caf3027 (patch) | |
tree | 600746fc28046ddfc58498fd69d4afef8d40e419 /apps/plugins/rockboy/lcd.c | |
parent | d42041043b95617244ffdb9150c5e2f2720a8a83 (diff) | |
download | rockbox-59d4d2025c9f1b0a68b780fe6a6f0e313caf3027.tar.gz rockbox-59d4d2025c9f1b0a68b780fe6a6f0e313caf3027.zip |
Revert last commit (accidentally committed the whole tree)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19095 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, 14 insertions, 19 deletions
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index f62e3a9ce3..da3b138e51 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; | 67 | int i, j; |
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,12 +73,10 @@ 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; | ||
77 | if (i == 384) i = 512; | 76 | if (i == 384) i = 512; |
78 | if (i == 896) break; | 77 | if (i == 896) break; |
79 | if (!patdirty[i]) continue; | 78 | if (!patdirty[i]) continue; |
80 | patdirty[i] = 0; | 79 | patdirty[i] = 0; |
81 | |||
82 | for (j = 0; j < 8; j++) | 80 | for (j = 0; j < 8; j++) |
83 | { | 81 | { |
84 | #if CONFIG_CPU == SH7034 | 82 | #if CONFIG_CPU == SH7034 |
@@ -378,8 +376,8 @@ static void tilebuf(void) | |||
378 | int base; | 376 | int base; |
379 | byte *tilemap, *attrmap; | 377 | byte *tilemap, *attrmap; |
380 | int *tilebuf; | 378 | int *tilebuf; |
381 | const int *wrap; | 379 | int *wrap; |
382 | static const int wraptable[64] ICONST_ATTR = | 380 | static int wraptable[64] = |
383 | { | 381 | { |
384 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, | 382 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, |
385 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32 | 383 | 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,-32 |
@@ -780,11 +778,11 @@ static void spr_enum(void) | |||
780 | static void spr_scan(void) ICODE_ATTR; | 778 | static void spr_scan(void) ICODE_ATTR; |
781 | static void spr_scan(void) | 779 | static void spr_scan(void) |
782 | { | 780 | { |
783 | int i; | 781 | int i, x; |
784 | byte ns = NS; | 782 | byte pal, b, ns = NS; |
785 | byte *src, *dest; | 783 | byte *src, *dest, *bg, *pri; |
786 | struct vissprite *vs; | 784 | struct vissprite *vs; |
787 | static byte bgdup[256] IBSS_ATTR; | 785 | static byte bgdup[256]; |
788 | 786 | ||
789 | if (!ns) return; | 787 | if (!ns) return; |
790 | 788 | ||
@@ -793,8 +791,7 @@ static void spr_scan(void) | |||
793 | 791 | ||
794 | for (; ns; ns--, vs--) | 792 | for (; ns; ns--, vs--) |
795 | { | 793 | { |
796 | int x = vs->x; | 794 | x = vs->x; |
797 | |||
798 | if (x > 159) continue; | 795 | if (x > 159) continue; |
799 | if (x < -7) continue; | 796 | if (x < -7) continue; |
800 | if (x < 0) | 797 | if (x < 0) |
@@ -810,25 +807,23 @@ static void spr_scan(void) | |||
810 | if (x > 152) i = 160 - x; | 807 | if (x > 152) i = 160 - x; |
811 | else i = 8; | 808 | else i = 8; |
812 | } | 809 | } |
813 | 810 | pal = vs->pal; | |
814 | byte pal = vs->pal; | ||
815 | |||
816 | if (vs->pri) | 811 | if (vs->pri) |
817 | { | 812 | { |
818 | byte *bg = bgdup + (dest - BUF); | 813 | bg = bgdup + (dest - BUF); |
819 | while (i--) | 814 | while (i--) |
820 | { | 815 | { |
821 | byte b = src[i]; | 816 | b = src[i]; |
822 | if (b && !(bg[i]&3)) dest[i] = pal|b; | 817 | if (b && !(bg[i]&3)) dest[i] = pal|b; |
823 | } | 818 | } |
824 | } | 819 | } |
825 | else if (hw.cgb) | 820 | else if (hw.cgb) |
826 | { | 821 | { |
827 | byte *bg = bgdup + (dest - BUF); | 822 | bg = bgdup + (dest - BUF); |
828 | byte *pri = PRI + (dest - BUF); | 823 | pri = PRI + (dest - BUF); |
829 | while (i--) | 824 | while (i--) |
830 | { | 825 | { |
831 | byte b = src[i]; | 826 | b = src[i]; |
832 | if (b && (!pri[i] || !(bg[i]&3))) | 827 | if (b && (!pri[i] || !(bg[i]&3))) |
833 | dest[i] = pal|b; | 828 | dest[i] = pal|b; |
834 | } | 829 | } |