Well yeah, but one thing I forgot to mention/use... The joystick_t has a "center" field. Change my printf line to: vec2b_t center = data.nunchuk.js.center; printf("Nunchuk X: %d \n Nunchuk Y: %d \n", data.nunchuk.js.pos.x - center.x, data.nunchuk.js.pos.y - center.y); Then play with those x and y values. I forgot about joystick center/neutral calibration >.>by AerialX - Coding
Gah, don't know why I did this >.> Here's your example, kk? Notice how ugly the Nunchuk's X and Y values are, I'd personally prefer to use mag and ang :P Instructions: Copy the Wii template from wii-examples... Replace template.c with: #include #include #include #include static void *xfb = NULL; static GXRModeObj *rmode = NULL; //--by AerialX - Coding
Quotehenke37Personally I think that the ang and mag properties are bloat. It's not that fircking hard to do it yourself, but only when needed. I just want access to normal scaled X and Y values. True enough, so just use the pos field instead. Again, there's no instant way to check for a "down" press or not, but just pick a reasonable threshold for the X and Y values.by AerialX - Coding
Unfortunately you can't do that. If it did exist, what would count as a down event? It's not a button, you'd have to specify a magnitude (maybe half/0.5) that counts as a press (and find out what angle counts for what directions). In any case, libogc isn't all that high-level, and won't make that call for you. You can make a function for it yourself though. Use the magby AerialX - Coding
Just improvising here, but something along these lines: // Assuming WPAD is all set up... struct expansion_t data; WPAD_Expansion(WPAD_CHAN_0, &data); // Get expansion info from the first wiimote if (data.type == WPAD_EXP_NUNCHUK) { // Ensure there's a nunchuk do something with data.nunchuk.joystick } data.nunchuk.joystick is of type joystick_t defined in wiiuse/wiiuse.h: tyby AerialX - Coding
Take a look through wiiuse/wpad.h (inside the libogc include directory). The wiiuse guide should help you understand a bit how WPAD works behind the scenes, although you don't use wiiuse directly. WPAD is fairly self-explanatory anyway, just studying the header should help you find out how to read data from extension controllers (and how to check what extension is currently connected).by AerialX - Coding
So let's say I have a 3D scene going in GX; so far so good. Now, I want to draw 2D graphics on the screen on top of this. Say a HUD of some sort, a Lives Left indicator, doesn't matter what. So what's the best way (or any way, for that matter) to do this? The only solution that comes to mind for me is allocating an extra framebuffer for GX, then using that as a texture in the orby AerialX - Coding
1) lern2english 2) It's a DVD, not a CD. Call it a disc if you feel like being ambiguous. 3) To actually answer your question... no. Once installed, the homebrew channel doesn't require the Twilight Princess disc to run. Howevery, of course you will need TP to install it in the first place; I personally chose to rent it for a day. And lol Twilight Quest sounds like a good name forby AerialX - Homebrew General
That depends on your definition of "everything" ;) I'm going away on vacation for the next two weeks. When I get back I'll finish up the texturing in GX that I've been working on tonight and it'll be more or less on par with the OpenGL demo (minus sound; that'll be a hell of an adventure on its own >.>).by AerialX - Coding
QuoteShinNiLDid you try just modify the makefile of the wii-examples template? I tried to build this way and get this: /home/nilton/wiidev/xRick/xrick_source/src/system.h:15:19: error: mygcn.h: No such file or directory That's what I did then gave up when it seemed to not be using libogc. Chances are you're going to have to port it to libogc before getting it to build, WiiPhby AerialX - Coding
This must be ooooold (OpenGC was an ancient libogc or something else entirely?)... I don't have the environment to build it either, sorry.by AerialX - Coding
Um, ignore this; I'm an idiot :/ For the curious: Whichever input was ->Update()'d last would write its button states over the previous input's. My project finally has proper multi-input support and GX now works (that took me all night): Pictureby AerialX - Coding
Didn't you post this last night? I saw batch files, which means Windows, which means I can't help you. How about expanding on what environment is required to build it? :Pby AerialX - Coding
Well, as expected... That changed nothing D:by AerialX - Coding
WPADData* data = WPAD_Data(WPAD_CHAN_0); I am using WPAD_CHAN_0, although admittedly it's messy and checks things differently than the PAD checking code (because the WPAD stuff was written first and mainly just ported from my PC wiiuse checking code). I'll change it for consistency's sake, make it use WPAD_ButtonsDown() and friends, but I really doubt that'll fix anything sincby AerialX - Coding
Quotevader347You are only calling WPAD_INIT(); and PAD_INIT(); once right? Unless boost's foreach is seriously flawed, of course (and actually I tried it with a normal for loop anyway to ensure that wasn't the problem). I just don't see what could be wrong, since commenting out one of the two makes the other work, just as switching their order does.by AerialX - Coding
QuoteblastyThe mentioned code in the first post should work. Perhaps show us some more of the actual handling code? I've used both WPAD/PAD in one application too, which worked just fine. Does WPAD_Init() actually work? (Check if the player1 LED comes up on the wiimote if you press a button) Yes, the player 1 LED does come up once you press a button, so WPAD_Init() is working. My code justby AerialX - Coding
The deadline is November 15th. Even more time :) I thought my latest project would be perfect for the competition (and it may well be), but then I read that you're not allowed to release it to the public until the contest is over. So fuck it; I don't need a prize anyway :Pby AerialX - Coding
Um, what... Are you just asking or indicating that you know something? No, I don't know what they specifically do, but I assume they do some housekeeping that'll set up the PAD and WPAD subsystems for you. I don't see any reason why they would conflict; they should be seperate and I've seen homebrew that makes use of both input methods at the same time.by AerialX - Coding
y halo thar DW For the interested: It's funny, because I was just thinking I'd need to make this for my own project, and was wondering the best way to make it pluggable due to all the varying game loop setups.by AerialX - Coding
I have an input system going, and basically what it does is this: WPAD_Init(); PAD_Init(); while (1) { WPAD_ScanPads(); // Check down events and do stuff PAD_ScanPads(); // Check down events and do stuff } Doing this effectively renders the Wiimote code useless (it doesn't seem to pick up anything). Switching the order (init PAD first; scan PAD first) causes tby AerialX - Coding
Well, it looks like there just isn't that much to find... I guess I'll be studying random homebrew applications/games and learning what I can from there. tona: Such a stickied list would be great, although at the moment it seems that there wouldn't be too many resources to list. Arikado: I'm more interested in the 3D aspect of things, since that's what my project reby AerialX - Coding
That's what I was referring to when I said: QuoteAerialXThe doxygen is nice, but overwhelming when trying to figure out how to start The thing is, API documentation like that can only do so much when you don't know much about how the system works. Are there no really good, extensive tutorials from say the gamecube era (or better yet, recent Wii :P)?by AerialX - Coding
Well, I need some links to libOGC documentation / tutorials. After searching around all of last night I really didn't find much... For WPAD I saw one example on the wiki, and nothing else; the header has no comments, no doxygen to be found, etc. I guess I'll have to look through the source to see exactly how some things map to wiiuse (which I've used), or just screw around and seeby AerialX - Coding