Thank You for your continued support and contributions!
/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id: Testing File$ * * Coded by Kyle Kamperschroer (Phalangees) * * All files in this archive are subject to the GNU General Public License. * See the file COPYING in the source tree root for full license agreement. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************///The mother of all includes#include "plugin.h"PLUGIN_HEADER//As of now, I'm just learning and I only have a gigabeat so I coded for a gigabeat.#define QUIT BUTTON_MENU#define SELECT BUTTON_SELECT#define UP BUTTON_UP#define DOWN BUTTON_DOWN#define LEFT BUTTON_LEFT#define RIGHT BUTTON_RIGHTstatic struct plugin_api* rb;enum plugin_status plugin_start(struct plugin_api* api, void* parameter){ (void)parameter; rb = api; int button; int lcdwidth = LCD_WIDTH; int lcdheight = LCD_HEIGHT; int xpos = lcdwidth/2; //Puts the circle in int ypos = lcdheight/2; //the middle of the screen int xspeed = 0; int yspeed = 0; while (true) { button = rb->button_get(false); //Gets user input if(button==UP){ yspeed++; } if(button==DOWN){ yspeed--; } if(button==LEFT){ xspeed++; } if(button==RIGHT){ xspeed--; } if(button==SELECT){ xspeed /= 2; //The hand break :p yspeed /= 2; } if(button==QUIT){ break; //Breaks out of the while loop } //Checks for walls (edges of screen) if(xpos <=0 || xpos >= lcdwidth) xspeed = -xspeed; if(ypos <=0 || ypos >= lcdheight) yspeed = -yspeed; //Changes the position depending on the speed xpos -= xspeed; ypos -= yspeed; //Updates display rb->lcd_clear_display(); rb->lcd_fillrect(xpos,ypos,4,4); rb->lcd_fillrect(xpos+1,ypos-1,2,6); rb->lcd_fillrect(xpos-1,ypos+1,6,2); rb->lcd_update(); //Checks for USB (not tested) if (rb->default_event_handler(button) == SYS_USB_CONNECTED) return PLUGIN_USB_CONNECTED; } return PLUGIN_OK;}
Thank you for your help Badger.
extern const fb_data coinmuncher_objects[];
rb->lcd_bitmap_transparent_part(coinmuncher_objects, 0, 30, 60, manX, manY, 20, 20);
Page created in 0.119 seconds with 15 queries.