ホーム › UI.Input.GameInput › GameInputArcadeStickInfo
GameInputArcadeStickInfo
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| menuButtonLabel | GameInputLabel | 4 | +0 | +0 | メニューボタンの物理ラベルである。 |
| viewButtonLabel | GameInputLabel | 4 | +4 | +4 | ビューボタンの物理ラベルである。 |
| stickUpLabel | GameInputLabel | 4 | +8 | +8 | スティック上方向の物理ラベルである。 |
| stickDownLabel | GameInputLabel | 4 | +12 | +12 | スティック下方向の物理ラベルである。 |
| stickLeftLabel | GameInputLabel | 4 | +16 | +16 | スティック左方向の物理ラベルである。 |
| stickRightLabel | GameInputLabel | 4 | +20 | +20 | スティック右方向の物理ラベルである。 |
| actionButton1Label | GameInputLabel | 4 | +24 | +24 | アクションボタン1の物理ラベルである。 |
| actionButton2Label | GameInputLabel | 4 | +28 | +28 | アクションボタン2の物理ラベルである。 |
| actionButton3Label | GameInputLabel | 4 | +32 | +32 | アクションボタン3の物理ラベルである。 |
| actionButton4Label | GameInputLabel | 4 | +36 | +36 | アクションボタン4の物理ラベルである。 |
| actionButton5Label | GameInputLabel | 4 | +40 | +40 | アクションボタン5の物理ラベルである。 |
| actionButton6Label | GameInputLabel | 4 | +44 | +44 | アクションボタン6の物理ラベルである。 |
| specialButton1Label | GameInputLabel | 4 | +48 | +48 | 特殊ボタン1の物理ラベルである。 |
| specialButton2Label | GameInputLabel | 4 | +52 | +52 | 特殊ボタン2の物理ラベルである。 |
各言語での定義
#include <windows.h>
// GameInputArcadeStickInfo (x64 56 / x86 56 バイト)
typedef struct GameInputArcadeStickInfo {
GameInputLabel menuButtonLabel;
GameInputLabel viewButtonLabel;
GameInputLabel stickUpLabel;
GameInputLabel stickDownLabel;
GameInputLabel stickLeftLabel;
GameInputLabel stickRightLabel;
GameInputLabel actionButton1Label;
GameInputLabel actionButton2Label;
GameInputLabel actionButton3Label;
GameInputLabel actionButton4Label;
GameInputLabel actionButton5Label;
GameInputLabel actionButton6Label;
GameInputLabel specialButton1Label;
GameInputLabel specialButton2Label;
} GameInputArcadeStickInfo;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct GameInputArcadeStickInfo
{
public int menuButtonLabel;
public int viewButtonLabel;
public int stickUpLabel;
public int stickDownLabel;
public int stickLeftLabel;
public int stickRightLabel;
public int actionButton1Label;
public int actionButton2Label;
public int actionButton3Label;
public int actionButton4Label;
public int actionButton5Label;
public int actionButton6Label;
public int specialButton1Label;
public int specialButton2Label;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure GameInputArcadeStickInfo
Public menuButtonLabel As Integer
Public viewButtonLabel As Integer
Public stickUpLabel As Integer
Public stickDownLabel As Integer
Public stickLeftLabel As Integer
Public stickRightLabel As Integer
Public actionButton1Label As Integer
Public actionButton2Label As Integer
Public actionButton3Label As Integer
Public actionButton4Label As Integer
Public actionButton5Label As Integer
Public actionButton6Label As Integer
Public specialButton1Label As Integer
Public specialButton2Label As Integer
End Structureimport ctypes
from ctypes import wintypes
class GameInputArcadeStickInfo(ctypes.Structure):
_fields_ = [
("menuButtonLabel", ctypes.c_int),
("viewButtonLabel", ctypes.c_int),
("stickUpLabel", ctypes.c_int),
("stickDownLabel", ctypes.c_int),
("stickLeftLabel", ctypes.c_int),
("stickRightLabel", ctypes.c_int),
("actionButton1Label", ctypes.c_int),
("actionButton2Label", ctypes.c_int),
("actionButton3Label", ctypes.c_int),
("actionButton4Label", ctypes.c_int),
("actionButton5Label", ctypes.c_int),
("actionButton6Label", ctypes.c_int),
("specialButton1Label", ctypes.c_int),
("specialButton2Label", ctypes.c_int),
]#[repr(C)]
pub struct GameInputArcadeStickInfo {
pub menuButtonLabel: i32,
pub viewButtonLabel: i32,
pub stickUpLabel: i32,
pub stickDownLabel: i32,
pub stickLeftLabel: i32,
pub stickRightLabel: i32,
pub actionButton1Label: i32,
pub actionButton2Label: i32,
pub actionButton3Label: i32,
pub actionButton4Label: i32,
pub actionButton5Label: i32,
pub actionButton6Label: i32,
pub specialButton1Label: i32,
pub specialButton2Label: i32,
}import "golang.org/x/sys/windows"
type GameInputArcadeStickInfo struct {
menuButtonLabel int32
viewButtonLabel int32
stickUpLabel int32
stickDownLabel int32
stickLeftLabel int32
stickRightLabel int32
actionButton1Label int32
actionButton2Label int32
actionButton3Label int32
actionButton4Label int32
actionButton5Label int32
actionButton6Label int32
specialButton1Label int32
specialButton2Label int32
}type
GameInputArcadeStickInfo = record
menuButtonLabel: Integer;
viewButtonLabel: Integer;
stickUpLabel: Integer;
stickDownLabel: Integer;
stickLeftLabel: Integer;
stickRightLabel: Integer;
actionButton1Label: Integer;
actionButton2Label: Integer;
actionButton3Label: Integer;
actionButton4Label: Integer;
actionButton5Label: Integer;
actionButton6Label: Integer;
specialButton1Label: Integer;
specialButton2Label: Integer;
end;const GameInputArcadeStickInfo = extern struct {
menuButtonLabel: i32,
viewButtonLabel: i32,
stickUpLabel: i32,
stickDownLabel: i32,
stickLeftLabel: i32,
stickRightLabel: i32,
actionButton1Label: i32,
actionButton2Label: i32,
actionButton3Label: i32,
actionButton4Label: i32,
actionButton5Label: i32,
actionButton6Label: i32,
specialButton1Label: i32,
specialButton2Label: i32,
};type
GameInputArcadeStickInfo {.bycopy.} = object
menuButtonLabel: int32
viewButtonLabel: int32
stickUpLabel: int32
stickDownLabel: int32
stickLeftLabel: int32
stickRightLabel: int32
actionButton1Label: int32
actionButton2Label: int32
actionButton3Label: int32
actionButton4Label: int32
actionButton5Label: int32
actionButton6Label: int32
specialButton1Label: int32
specialButton2Label: int32struct GameInputArcadeStickInfo
{
int menuButtonLabel;
int viewButtonLabel;
int stickUpLabel;
int stickDownLabel;
int stickLeftLabel;
int stickRightLabel;
int actionButton1Label;
int actionButton2Label;
int actionButton3Label;
int actionButton4Label;
int actionButton5Label;
int actionButton6Label;
int specialButton1Label;
int specialButton2Label;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; GameInputArcadeStickInfo サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; menuButtonLabel : GameInputLabel (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; viewButtonLabel : GameInputLabel (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; stickUpLabel : GameInputLabel (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; stickDownLabel : GameInputLabel (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; stickLeftLabel : GameInputLabel (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; stickRightLabel : GameInputLabel (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; actionButton1Label : GameInputLabel (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; actionButton2Label : GameInputLabel (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; actionButton3Label : GameInputLabel (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; actionButton4Label : GameInputLabel (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; actionButton5Label : GameInputLabel (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; actionButton6Label : GameInputLabel (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; specialButton1Label : GameInputLabel (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; specialButton2Label : GameInputLabel (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global GameInputArcadeStickInfo
#field int menuButtonLabel
#field int viewButtonLabel
#field int stickUpLabel
#field int stickDownLabel
#field int stickLeftLabel
#field int stickRightLabel
#field int actionButton1Label
#field int actionButton2Label
#field int actionButton3Label
#field int actionButton4Label
#field int actionButton5Label
#field int actionButton6Label
#field int specialButton1Label
#field int specialButton2Label
#endstruct
stdim st, GameInputArcadeStickInfo ; NSTRUCT 変数を確保
st->menuButtonLabel = 100
mes "menuButtonLabel=" + st->menuButtonLabel