forked from len0rd/rockbox
First part of graphics api rework. Special functions, parameter handling, pixel functions, lines and filled primitives done for black & white core, main display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6856 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0e935bdf01
commit
04daef17a1
41 changed files with 1019 additions and 558 deletions
|
@ -72,10 +72,14 @@ struct pong {
|
|||
|
||||
void singlepad(int x, int y, int set)
|
||||
{
|
||||
if(set)
|
||||
if(set) {
|
||||
rb->lcd_fillrect(x, y, PAD_WIDTH, PAD_HEIGHT);
|
||||
else
|
||||
rb->lcd_clearrect(x, y, PAD_WIDTH, PAD_HEIGHT);
|
||||
}
|
||||
else {
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
rb->lcd_fillrect(x, y, PAD_WIDTH, PAD_HEIGHT);
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID);
|
||||
}
|
||||
}
|
||||
|
||||
void pad(struct pong *p, int pad)
|
||||
|
@ -241,7 +245,9 @@ void ball(struct pong *p)
|
|||
score(p, 0);
|
||||
|
||||
/* clear old position */
|
||||
rb->lcd_clearrect(x, y, BALL_WIDTH, BALL_HEIGTH);
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
rb->lcd_fillrect(x, y, BALL_WIDTH, BALL_HEIGTH);
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID);
|
||||
|
||||
/* draw the new ball position */
|
||||
rb->lcd_fillrect(newx, newy, BALL_WIDTH, BALL_HEIGTH);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue