forked from len0rd/rockbox
lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
This commit is contained in:
parent
0250be1d67
commit
a1842c04f9
49 changed files with 1653 additions and 341 deletions
|
|
@ -1027,7 +1027,7 @@ static inline void draw_ship(void)
|
|||
}
|
||||
|
||||
|
||||
static inline void fire_alpha(int xc, int yc, fb_data color)
|
||||
static inline void fire_alpha(int xc, int yc, unsigned color)
|
||||
{
|
||||
int oldmode = rb->lcd_get_drawmode();
|
||||
|
||||
|
|
@ -1128,12 +1128,12 @@ static void move_fire(void)
|
|||
/* Check for hit*/
|
||||
for (i = FIRE_SPEED; i >= 0; i--) {
|
||||
pix = get_pixel(fire_x, fire_y + i);
|
||||
if(pix == screen_white) {
|
||||
if(!memcmp(&pix, &screen_white, sizeof(fb_data))) {
|
||||
hit_white = true;
|
||||
fire_y += i;
|
||||
break;
|
||||
}
|
||||
if(pix == screen_green) {
|
||||
if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
|
||||
hit_green = true;
|
||||
fire_y += i;
|
||||
break;
|
||||
|
|
@ -1336,7 +1336,8 @@ static void move_bombs(void)
|
|||
/* Check for green (ship or shield) */
|
||||
for (j = BOMB_HEIGHT; j >= BOMB_HEIGHT - BOMB_SPEED; j--) {
|
||||
bombs[i].target = 0;
|
||||
if(get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j) == screen_green) {
|
||||
fb_data pix = get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j);
|
||||
if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
|
||||
/* Move to hit pixel */
|
||||
bombs[i].x += BOMB_WIDTH / 2;
|
||||
bombs[i].y += j;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue