mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-12-22 18:39:18 +00:00
[CHG] Example nonameno02 is now compiling
This commit is contained in:
parent
8770af329b
commit
d6e07b3a68
3 changed files with 10 additions and 11 deletions
|
@ -19,7 +19,7 @@ int main() {
|
|||
|
||||
guVector ln[4];
|
||||
guVector d[4];
|
||||
float xt ,yt, zt;
|
||||
float xt, yt, zt;
|
||||
int i;
|
||||
float a=0.0, b=0.0;
|
||||
float c=2;
|
||||
|
@ -35,7 +35,7 @@ int main() {
|
|||
|
||||
a+=0.04;
|
||||
b+=0.02;
|
||||
for(i=0;i<4;i++){
|
||||
for(i=0;i<4;i++) {
|
||||
xt=l[i].x*cos(a)-l[i].z*sin(a);
|
||||
yt=l[i].y;
|
||||
zt=l[i].x*sin(a)+l[i].z*cos(a);
|
||||
|
|
|
@ -16,18 +16,17 @@ extern GXRModeObj *rmode;
|
|||
|
||||
int main() {
|
||||
u32 WPADDown;
|
||||
float sinx[4]={0,0,0,0},siny[4]={0,0,0,0};
|
||||
float sinx[4]={0,0,0,0}, siny[4]={0,0,0,0};
|
||||
int i;
|
||||
|
||||
|
||||
|
||||
GRRLIB_Init();
|
||||
WPAD_Init();
|
||||
|
||||
|
||||
GRRLIB_texImg *tex_screen[10];
|
||||
for(i=0;i<10;i++){
|
||||
tex_screen[i] = GRRLIB_CreateEmptyTexture(rmode->fbWidth,rmode->efbHeight);
|
||||
for(i=0; i<10; i++) {
|
||||
tex_screen[i] = GRRLIB_CreateEmptyTexture(rmode->fbWidth, rmode->efbHeight);
|
||||
}
|
||||
|
||||
GRRLIB_texImg *tex_ball = GRRLIB_LoadTexture(ball);
|
||||
|
@ -36,11 +35,11 @@ int main() {
|
|||
WPAD_ScanPads();
|
||||
WPADDown = WPAD_ButtonsDown(0);
|
||||
|
||||
for(i=0;i<10;i++){
|
||||
GRRLIB_DrawImg(0,0, tex_screen[i] , 0, 1, 1, 0xFFFFFFFF);
|
||||
GRRLIB_DrawImg(((640-64)/2)+sin(sinx[0])*160+sin(sinx[1])*sin(sinx[2])*50,((480-64)/2)+sin(siny[0])*120+sin(siny[1])*sin(siny[2])*50, tex_ball , 0, 1, 1, 0xFFFFFFFF);
|
||||
for(i=0; i<10; i++) {
|
||||
GRRLIB_DrawImg(0, 0, tex_screen[i], 0, 1, 1, 0xFFFFFFFF);
|
||||
GRRLIB_DrawImg(((640-64)/2)+sin(sinx[0])*160+sin(sinx[1])*sin(sinx[2])*50,((480-64)/2)+sin(siny[0])*120+sin(siny[1])*sin(siny[2])*50, tex_ball, 0, 1, 1, 0xFFFFFFFF);
|
||||
sinx[0]+=0.02;sinx[1]+=0.03;sinx[2]+=0.05;siny[0]+=0.03;siny[1]+=0.01;siny[2]+=0.06;
|
||||
GRRLIB_Screen2Texture(tex_screen[i]);
|
||||
GRRLIB_Screen2Texture(0, 0, tex_screen[i], false);
|
||||
GRRLIB_Render();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ ifeq ($(strip $(DEVKITPRO)),)
|
|||
endif
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Applicatin will be named after this directory
|
||||
# Application will be named after this directory
|
||||
#-------------------------------------------------------------------------------
|
||||
APP := $(notdir $(CURDIR))
|
||||
ELF := $(APP).elf
|
||||
|
|
Loading…
Reference in a new issue