summaryrefslogtreecommitdiff
path: root/apps/plugins/invadrox.c
diff options
context:
space:
mode:
authorMoshe Piekarski <dev.rockbox@melachim.net>2020-10-06 13:34:04 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 12:28:48 -0400
commit12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a (patch)
treecb9850c2c4ea68b7acc816828c4d53dd7c8391f9 /apps/plugins/invadrox.c
parent5d5f8169b53fc989b456b0f0d7940bcf9415cbeb (diff)
downloadrockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.tar.gz
rockbox-12f3ed1699d6bef25bed90ba95cbcc1a6bb4934a.zip
make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
Diffstat (limited to 'apps/plugins/invadrox.c')
-rw-r--r--apps/plugins/invadrox.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 57d6fabe8d..0b26581b30 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -776,12 +776,12 @@ bool aliens_down, aliens_right, hit_left_border, hit_right_border;
776#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 776#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
777static inline fb_data get_pixel(int x, int y) 777static inline fb_data get_pixel(int x, int y)
778{ 778{
779 return rb->lcd_framebuffer[x*LCD_HEIGHT+y]; 779 return *rb->lcd_framebuffer[x*LCD_HEIGHT+y];
780} 780}
781#else 781#else
782static inline fb_data get_pixel(int x, int y) 782static inline fb_data get_pixel(int x, int y)
783{ 783{
784 return rb->lcd_framebuffer[ytab[y] + x]; 784 return *rb->lcd_framebuffer[ytab[y] + x];
785} 785}
786#endif 786#endif
787 787
@@ -794,7 +794,7 @@ static const unsigned char shifts[4] = {
794/* Horizontal packing */ 794/* Horizontal packing */
795static inline fb_data get_pixel(int x, int y) 795static inline fb_data get_pixel(int x, int y)
796{ 796{
797 return (rb->lcd_framebuffer[ytab[y] + (x >> 2)] >> shifts[x & 3]) & 3; 797 return (*rb->lcd_framebuffer[ytab[y] + (x >> 2)] >> shifts[x & 3]) & 3;
798} 798}
799#else 799#else
800/* Vertical packing */ 800/* Vertical packing */
@@ -803,7 +803,7 @@ static const unsigned char shifts[4] = {
803}; 803};
804static inline fb_data get_pixel(int x, int y) 804static inline fb_data get_pixel(int x, int y)
805{ 805{
806 return (rb->lcd_framebuffer[ytab[y] + x] >> shifts[y & 3]) & 3; 806 return (*rb->lcd_framebuffer[ytab[y] + x] >> shifts[y & 3]) & 3;
807} 807}
808#endif /* Horizontal/Vertical packing */ 808#endif /* Horizontal/Vertical packing */
809 809