Wpad is ready

From Bennu Wiki
Jump to navigation Jump to search


Definition

INT wpad_is_ready ( <INT wpad_number> )

Returns whether controller wpad_number is ready to be used.

Parameters

INT wpad_number - The controller whose state you want to retrieve. wpad_number must be a positive integer up to 8 (the maximum number of controllers supported by the Wii console).

Returns

INT : Controller state; 1 means controller is ready and 0 means it's not.

Example

Global
    int i;
End

Process Main()
Begin
    while(! mouse.left)
        delete_text(ALL_TEXT)
        for(i=1; i<=8; i++)
            if(wpad_is_ready(i))
                write(0,0,10*i,0,"Controller "+i+" is ready");
            else
                write(0,0,10*i,0,"Controller "+i+" is not ready")
            end;
        end;
        frame;
    end;
End

Used in example: write(), wpad_is_ready(), mouse, delete_text()


mod_wpad Functions
Wpad_info()Wpad_info_bb()Wpad_is_ready()Wpad_rumble()