You can change both foreground (text) and background colour by using VT escape sequences, but they are limited to a few colours. I also noticed that while you can change the text colour of a single word or letter without any problems multiple times in a string, you cannot do the same with background colours. I always ended up having the whole background painted in a single colour. Anyway, youby Botskiz - Coding
Getting the controller to rumble for a set period of time is quite simply if you have a timer at your disposal. Whenever you enable the rumble just make sure to save the current time + the time you want the controller to rumble somewhere. Now simply add a check to your controller update routine that compares the current time with the desired rumble ending time. If the current time is greater thanby Botskiz - Coding
There are multiple ways of figuring out the type of controller connected to the Wii remote. Depending on what you want to do one way might be more useful than another. Please note that all the code below is untested and written from the top of my head, so you might want to do some additional error checking. But I hope it's correct enough to help you figuring out the rest by yourself :) Thby Botskiz - Coding
Correct me if I'm wrong, but wouldn't this expression always be 1, since both values are non zero and you're comparing them with a logical or? (WPAD_GUITAR_HERO_3_BUTTON_STRUM_DOWN || WPAD_GUITAR_HERO_3_BUTTON_STRUM_UP ) Obviously this would result in unwanted results in your second if statement, since you end up doing a binary and operation with buttonsDown and 1, instead of buby Botskiz - Coding
I posted the Bongo problem a while ago in the coding section, but I also managed to figure out if there's a Bongo or a Standard controller connected, although it might not be the best way. For example I'm not sure how this code works correctly with anything other than a standard wired GC controller or a Bongo connected to the console. int i; u32 inputBuffer[2]; // Check wetherby Botskiz - Homebrew General
Hmm, I'm not sure why it freezes. But you could try using the callback functions to set some poweroff / reset flags, terminate your main loop if one of these flags is set, and reset or shut down the Wii after that. That's the way I usually do it, and I've never encountered any freezing. Edit: Bah, I'm too slow. Tantric already covered it :) // Replaced "<" with "("by Botskiz - Coding
You should be able to use the Wii remote power button with the current release of libogc ( 1.7.0 ) Straight from wpad.h: void WPAD_SetPowerButtonCallback(WPADShutdownCallback cb); typedef void (*WPADShutdownCallback)(s32 chan); The usage is pretty much like SYS_SetResetCallback() and SYS_SetPowerCallback(), except that the callback function must have a s32 as parameter. This is useful iby Botskiz - Coding
The microphone is mapped to the right analog trigger. So you can just use PAD_TriggerR() to find out if someone clapped or not. Update: I feel like an idiot now. Somehow I managed to pass a wrong pointer to SI_GetResponse(), when I tried it last time. No wonder it gave me strange results. I figured it out now, though. In case anyone is interested, here's how I did it. int i; u32 inpby Botskiz - Coding
Thanks, marcan. I've found the same info yesterday, and the data received by SI_GetType() and SI_GetStatus() is indeed identical. But like daniel_c_w already said, Donkey Kong Jungle Beat definitely distinguishes between the two controller types. The button mapping on a standard controller differs from the button mapping of the bongos, and the game even shows an information screen if you donby Botskiz - Coding
I have a slightly annoying problem right now, that I can't seem to get rid of. Basically, I'd like to know how I can find out wether a controller connected to the GC ports is a standard controller or a DK Bongo. The reason for this is obviously to avoid button mapping problems. For example, I want to use the left bongo drum to navigate up and down, but I don't want a normal GC conby Botskiz - Coding
Sorry for the late answer. I had some trouble with a broken PC power supply in the last few days. Anyway, thanks for the replies. I'm glad that the problem is not just my own stupidity. I guess I'll just stay away from GameCube Memory Cards for now, then. Even though I'm not sure what I would use them for anyway.by Botskiz - Coding
In case you haven't found the answer yourself by now, It should work if you use "data.gh3" instead of "data.nunchuk". And don't forget to replace WPAD_EXP_NUNCHUK with WPAD_EXP_GUITARHERO3. Unfortunately I can't test it, since I don't have a Guitar Controller, but this should work. struct expansion_t data; WPAD_Expansion(WPAD_CHAN_0, &data); if ( data.type == WPAD_EXPby Botskiz - Coding
Hello there. I've just started coding on Wii, so I basically just try to figure out how to work with the system and devkitPro at the moment. However, I've already run into a problem with mounting/accessing GameCube Memory Cards. I've assumed that it would work using the set of CARD functions, as seen in the GameCube example code, but trying to access a Memory Card that way alwayby Botskiz - Coding