mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-22 15:02:20 +00:00
Updated Compositing sample code.
Removed extra header, corrected typo and coding standard.
This commit is contained in:
parent
0d4b4d9a65
commit
ec8af365c5
1 changed files with 5 additions and 9 deletions
|
@ -4,15 +4,12 @@
|
||||||
#include <grrlib.h>
|
#include <grrlib.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
|
||||||
#include <malloc.h>
|
|
||||||
#include <wiiuse/wpad.h>
|
#include <wiiuse/wpad.h>
|
||||||
|
|
||||||
#include "gfx/font3d.h"
|
#include "gfx/font3d.h"
|
||||||
extern GXRModeObj *rmode;
|
extern GXRModeObj *rmode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
float rot=0;
|
float rot=0;
|
||||||
float i;
|
float i;
|
||||||
|
@ -25,10 +22,9 @@ int main() {
|
||||||
|
|
||||||
GRRLIB_texImg *tex_font = GRRLIB_LoadTexture(font3d);
|
GRRLIB_texImg *tex_font = GRRLIB_LoadTexture(font3d);
|
||||||
GRRLIB_InitTileSet(tex_font, 64, 64, 32);
|
GRRLIB_InitTileSet(tex_font, 64, 64, 32);
|
||||||
GRRLIB_SetHandle (tex_font, tex_font->tilew/2, tex_font->tileh+circsize);
|
GRRLIB_SetHandle(tex_font, tex_font->tilew/2, tex_font->tileh+circsize);
|
||||||
|
|
||||||
GRRLIB_texImg *tex_screen;
|
GRRLIB_texImg *tex_screen = GRRLIB_CreateEmptyTexture(rmode->fbWidth,rmode->efbHeight);
|
||||||
tex_screen = GRRLIB_CreateEmptyTexture(rmode->fbWidth,rmode->efbHeight);
|
|
||||||
|
|
||||||
GRRLIB_Settings.antialias = true;
|
GRRLIB_Settings.antialias = true;
|
||||||
|
|
||||||
|
@ -36,10 +32,10 @@ int main() {
|
||||||
WPAD_ScanPads();
|
WPAD_ScanPads();
|
||||||
if(WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) exit(0);
|
if(WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) exit(0);
|
||||||
|
|
||||||
// we say thant we will want to capture to a texture all the following
|
// we say that we will want to capture to a texture all the following
|
||||||
GRRLIB_CompoStart();
|
GRRLIB_CompoStart();
|
||||||
|
|
||||||
for(i=0;i<360;i+=30) {
|
for(i=0; i<360; i+=30) {
|
||||||
// We draw some letters
|
// We draw some letters
|
||||||
GRRLIB_DrawTile((rmode->fbWidth/2)-(tex_font->tilew/2), (rmode->efbHeight/2)-(tex_font->tileh+circsize), tex_font, rot+i, 1, 1, 0xFFFFFFFF, text[(int)(i/30)]-32);
|
GRRLIB_DrawTile((rmode->fbWidth/2)-(tex_font->tilew/2), (rmode->efbHeight/2)-(tex_font->tileh+circsize), tex_font, rot+i, 1, 1, 0xFFFFFFFF, text[(int)(i/30)]-32);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue