User:Elisherer
This is an old revision of this page, as edited by Elisherer (talk | contribs) at 21:17, 11 June 2009. It may differ significantly from the current revision. |
| ||||||||||
Wii
| ||||||||||
| ||||||||||
Development
| ||||||||||
| ||||||||||
Peripherals
| ||||||||||
Eli sherer
the maker of
I'm working on:
- [MiiStudio] an extension for libmii to generate images of a mii.
GRRLib Homemade Windows-like Cursor
For Entering my profile, you get a present...
void draw_cursor(int x,int y,int a)
{ double sina=sin(DegToRad(a)),cosa=cos(DegToRad(a));
Vector vcursor[8]={{0,0},{0,34},{8,26},{16,42},{21,39},{13,23},{23,23},{0,0}};
u32 fcolor[8]= {GRRLIB_WHITE,GRRLIB_WHITE,GRRLIB_WHITE,GRRLIB_WHITE,GRRLIB_WHITE,GRRLIB_WHITE,GRRLIB_WHITE,GRRLIB_WHITE},
lcolor[8]= {GRRLIB_BLACK,GRRLIB_BLACK,GRRLIB_BLACK,GRRLIB_BLACK,GRRLIB_BLACK,GRRLIB_BLACK,GRRLIB_BLACK,GRRLIB_BLACK};
//rotation:
//x'=xcosa-ysina
//y'=xsina+ycosa
int i,oldx,oldy;
for(i=0;i<8;i++)
{ oldx=vcursor[i].x;oldy=vcursor[i].y;
vcursor[i].x=oldx*cosa-oldy*sina+x;
vcursor[i].y=oldx*sina+oldy*cosa+y;
}
//draw left leg
GRRLIB_NGoneFilled(vcursor, fcolor,8);
GRRLIB_NGone(vcursor, lcolor,8);
}
Call it like this:
draw_cursor(ir1.sx-200,ir1.sy-250,ir1.angle);
GRRLIB_Render();