How do I use the nunchaku with wiiuse/wpad? March 21, 2011 03:55AM | Registered: 13 years ago Posts: 29 |
Re: How do I use the nunchaku with wiiuse/wpad? March 21, 2011 03:37PM | Registered: 13 years ago Posts: 363 |
static WPADData *wd[4]; //ir struct expansion_t data; //nunchuk while render loop { wd[0]= WPAD_Data(0); //ir WPAD_Expansion( 0, &data ); //nunchuk //CHECK BUTTONS if (data.type == WPAD_EXP_NUNCHUK) { m_x= (20.0 * (data.nunchuk.js.pos.x - data.nunchuk.js.center.x )) / data.nunchuk.js.max.x; m_y= (20.0 * (data.nunchuk.js.pos.y - data.nunchuk.js.center.y )) / data.nunchuk.js.max.y; //move_left=( m_x < -1 ); move_right=( m_x > 1 ); //move_up=( m_y > 1 ); move_down=( m_y < -1 ); } }