MLlib doesn't show my sprite March 12, 2010 01:40PM | Registered: 15 years ago Posts: 12 |
Quote
#include
#include "YoshiEgg_png.h"
int main(int argc, char **argv)
{
ML_Init();
ML_Sprite YoshiEgg;
ML_Image YoshiData;
ML_SetBackgroundColor(GX_COLOR_WHITE); // Background is now white
//The Sprite is a png file and ist 100x100 px
ML_LoadSpriteFromBuffer(&YoshiData, &YoshiEgg, YoshiEgg_png, 100, 100);
while(1)
{
ML_DrawSprite(&YoshiEgg); // Draws the sprite on the screen
ML_Refresh();
}
return 0;
}
Re: MLlib doesn't show my sprite March 12, 2010 04:28PM | Registered: 15 years ago Posts: 379 |
Re: MLlib doesn't show my sprite March 12, 2010 05:30PM | Registered: 15 years ago Posts: 12 |
Re: MLlib doesn't show my sprite March 14, 2010 03:12PM | Registered: 15 years ago Posts: 12 |
/* -==========================- | Bowser & Yoshi | -==========================- */ #include#include "Airship_png.h" #include "BowserCursor1_png.h" #include "BowserAngry_png.h" #include "font_png.h" int main(int argc, char **argv) { ML_Init(); ML_InitFAT(); ML_Sprite Airship, BowserAngry, BowserCursor1; ML_Image Airshipdata, BowserAngryData, Cursor1Data; ML_SetBackgroundColor(GX_COLOR_WHITE); // Background is now white //----------Laden der Sprites------------/ //Sprites Laden. Zuerst das Luftschiff ML_LoadSpriteFromBuffer(&Airshipdata, &Airship, Airship_png, 0, 200); //Bowserhand ML_LoadSpriteFromBuffer(&Cursor1Data, &BowserCursor1, BowserCursor1_png, 200, 200); //BowserAngry ML_LoadSpriteFromBuffer(&BowserAngryData, &BowserAngry, BowserAngry_png, 100, 200); while(1) { if(Wiimote[0].Held.Home) {printf("Programm wird beendet"); ML_Exit(); } //Sprites zeichnen ML_DrawSprite(&Airship); // Draws the sprite on the screen ML_DrawSprite(&BowserAngry); ML_DrawSprite(&BowserCursor1); ML_MoveSpriteWiimoteIR(&BowserCursor1, 0); if(Wiimote[0].Held.A && ML_IsWiimoteInSprite(0,&BowserAngry)) { ML_Screenshot("/screenshot.png"); printf("Tolles Bild gemacht"); } ML_Refresh(); } return 0; }
Re: MLlib doesn't show my sprite March 14, 2010 03:22PM | Admin Registered: 16 years ago Posts: 5,132 |
Re: MLlib doesn't show my sprite March 14, 2010 08:08PM | Registered: 15 years ago Posts: 12 |