Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <gccore.h>
- #include <stdio.h>
- #include <stdlib.h>
- static void *fb = 0;
- static GXRModeObj *rmode;
- bool close = false;
- int main ()
- {
- char nickname[10];
- VIDEO_Init();
- // init gamecube controllers
- PAD_Init();
- rmode = VIDEO_GetPreferredMode(NULL);
- fb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
- console_init(fb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
- VIDEO_Configure(rmode);
- VIDEO_SetNextFramebuffer(fb);
- VIDEO_SetBlack(false);
- VIDEO_Flush();
- VIDEO_WaitVSync();
- // actually get the nickname
- CONF_GetNickName((u8*)nickname);
- printf("\x1b[2;0H");
- printf("I know your Wii's name...\n");
- // print it out
- printf("%s !!!\n", nickname);
- printf("Feel scared now?\n");
- while(!close)
- {
- PAD_ScanPads();
- if (PAD_ButtonsDown(0) & PAD_BUTTON_START) close = true;
- VIDEO_WaitVSync();
- }
- VIDEO_SetBlack(true);
- VIDEO_Flush();
- exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment