GBDKライブラリドキュメント
GBDK libraries documentation |
||
---|---|---|
前
Prev |
5章
ライブラリ
Chapter 5.Libraries |
次
Next |
/* Joypad bits */ #define J_START 0x80U #define J_SELECT 0x40U #define J_B 0x20U #define J_A 0x10U #define J_DOWN 0x08U #define J_UP 0x04U #define J_LEFT 0x02U #define J_RIGHT 0x01U UBYTE joypad(void); UBYTE waitpad(UBYTE mask); void waitpadup(void);
joypad()関数は、ジョイパッドの現在のステータスを読みます。
それは、現在のスレッドの制御をブロックしません。
関数によって返されたジョイパッドステータスは、上に与えられた定義によって、各ボタンのために1ビットを使用します。
The joypad() function reads the current status of the joypad.It does not block the current thread of control.The joypad status returned by the function uses one bit for each button, according to the definitions given above.
waitpad()関数は、押される与えられたマスクからの任意のボタンを待ちます。
waitpadup()関数は、ボタンがすべてリリースされるのを待ちます。
The waitpad() function waits for any button from a given mask to be pushed.The waitpadup() function waits for all buttons to be released.
mask:待つボタンのセット。
mask: set of buttons to wait for.
joypad()と\waitpadup()関数はジョイパッドステータスを返します。
The joypad() and \waitpadup() functions return the joypad status.
前
Prev |
ホーム
Home |
次
Next |
グラフィックス/タイル関数
Graphics/Tile functions |
上
Up |
ハードウェアレジスタ-hardware.h
Hardware registers - hardware.h |