KPADGetProjectionPos

Syntax

#include <revolution/kpadOld.h>

typedef struct Vec2{
    f32 x;
    f32 y;
} Vec2;

typedef struct Rect {
    f32 left;
    f32 top;
    f32 right;
    f32 bottom;
} Rect;

void KPADGetProjectionPos( Vec2 *dst, const Vec2 *src, const Rect *projRect, f32 viRatio );

Arguments

dst Pointer to the Vec2-type variable that stores the coordinates (in projRect) after conversion.
src Pointer to the Vec2-type variable that stores the (normalized) coordinates before conversion.
projRect Rectangle in the projection coordinate system.
viRatio Value of fb_width / vi_width.

Return Values

None.

Description

Converts normalized coordinates to projection coordinates. In addition, this function corrects pixel ratio in the horizontal direction. This function calculates the coordinates that are closest to a spot (on the TV screen) being pointed to by the Wii Remote.

See Also

KPADEnableAimingMode, KPADDisableAimingMode, KPADSetSensorHeight

Revision History

2006/10/25 Changed the name to KPADOld library, beginning with Revolution SDK 2.3.
2006/09/07 Initial version.


CONFIDENTIAL