ホーム › Graphics.DirectDraw › DDHAL_DDMOTIONCOMPCALLBACKS
DDHAL_DDMOTIONCOMPCALLBACKS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | 構造体サイズ(バイト数)。呼び出し前に設定する。 |
| dwFlags | DWORD | 4 | +4 | +4 | 有効なコールバックを示すフラグを示す。 |
| GetMoCompGuids | LPDDHALMOCOMPCB_GETGUIDS | 8/4 | +8 | +8 | 対応モーション補償GUID列挙コールバックへのポインタ。 |
| GetMoCompFormats | LPDDHALMOCOMPCB_GETFORMATS | 8/4 | +16 | +12 | 対応フォーマット列挙コールバックへのポインタ。 |
| CreateMoComp | LPDDHALMOCOMPCB_CREATE | 8/4 | +24 | +16 | モーション補償オブジェクト作成コールバックへのポインタ。 |
| GetMoCompBuffInfo | LPDDHALMOCOMPCB_GETCOMPBUFFINFO | 8/4 | +32 | +20 | モーション補償バッファ情報取得コールバックへのポインタ。 |
| GetInternalMoCompInfo | LPDDHALMOCOMPCB_GETINTERNALINFO | 8/4 | +40 | +24 | 内部モーション補償情報取得コールバックへのポインタ。 |
| BeginMoCompFrame | LPDDHALMOCOMPCB_BEGINFRAME | 8/4 | +48 | +28 | モーション補償フレーム開始コールバックへのポインタ。 |
| EndMoCompFrame | LPDDHALMOCOMPCB_ENDFRAME | 8/4 | +56 | +32 | モーション補償フレーム終了コールバックへのポインタ。 |
| RenderMoComp | LPDDHALMOCOMPCB_RENDER | 8/4 | +64 | +36 | モーション補償描画コールバックへのポインタ。 |
| QueryMoCompStatus | LPDDHALMOCOMPCB_QUERYSTATUS | 8/4 | +72 | +40 | モーション補償状態問い合わせコールバックへのポインタ。 |
| DestroyMoComp | LPDDHALMOCOMPCB_DESTROY | 8/4 | +80 | +44 | モーション補償オブジェクト破棄コールバックへのポインタ。 |
各言語での定義
#include <windows.h>
// DDHAL_DDMOTIONCOMPCALLBACKS (x64 88 / x86 48 バイト)
typedef struct DDHAL_DDMOTIONCOMPCALLBACKS {
DWORD dwSize;
DWORD dwFlags;
LPDDHALMOCOMPCB_GETGUIDS GetMoCompGuids;
LPDDHALMOCOMPCB_GETFORMATS GetMoCompFormats;
LPDDHALMOCOMPCB_CREATE CreateMoComp;
LPDDHALMOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo;
LPDDHALMOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo;
LPDDHALMOCOMPCB_BEGINFRAME BeginMoCompFrame;
LPDDHALMOCOMPCB_ENDFRAME EndMoCompFrame;
LPDDHALMOCOMPCB_RENDER RenderMoComp;
LPDDHALMOCOMPCB_QUERYSTATUS QueryMoCompStatus;
LPDDHALMOCOMPCB_DESTROY DestroyMoComp;
} DDHAL_DDMOTIONCOMPCALLBACKS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDHAL_DDMOTIONCOMPCALLBACKS
{
public uint dwSize;
public uint dwFlags;
public IntPtr GetMoCompGuids;
public IntPtr GetMoCompFormats;
public IntPtr CreateMoComp;
public IntPtr GetMoCompBuffInfo;
public IntPtr GetInternalMoCompInfo;
public IntPtr BeginMoCompFrame;
public IntPtr EndMoCompFrame;
public IntPtr RenderMoComp;
public IntPtr QueryMoCompStatus;
public IntPtr DestroyMoComp;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDHAL_DDMOTIONCOMPCALLBACKS
Public dwSize As UInteger
Public dwFlags As UInteger
Public GetMoCompGuids As IntPtr
Public GetMoCompFormats As IntPtr
Public CreateMoComp As IntPtr
Public GetMoCompBuffInfo As IntPtr
Public GetInternalMoCompInfo As IntPtr
Public BeginMoCompFrame As IntPtr
Public EndMoCompFrame As IntPtr
Public RenderMoComp As IntPtr
Public QueryMoCompStatus As IntPtr
Public DestroyMoComp As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DDHAL_DDMOTIONCOMPCALLBACKS(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwFlags", wintypes.DWORD),
("GetMoCompGuids", ctypes.c_void_p),
("GetMoCompFormats", ctypes.c_void_p),
("CreateMoComp", ctypes.c_void_p),
("GetMoCompBuffInfo", ctypes.c_void_p),
("GetInternalMoCompInfo", ctypes.c_void_p),
("BeginMoCompFrame", ctypes.c_void_p),
("EndMoCompFrame", ctypes.c_void_p),
("RenderMoComp", ctypes.c_void_p),
("QueryMoCompStatus", ctypes.c_void_p),
("DestroyMoComp", ctypes.c_void_p),
]#[repr(C)]
pub struct DDHAL_DDMOTIONCOMPCALLBACKS {
pub dwSize: u32,
pub dwFlags: u32,
pub GetMoCompGuids: *mut core::ffi::c_void,
pub GetMoCompFormats: *mut core::ffi::c_void,
pub CreateMoComp: *mut core::ffi::c_void,
pub GetMoCompBuffInfo: *mut core::ffi::c_void,
pub GetInternalMoCompInfo: *mut core::ffi::c_void,
pub BeginMoCompFrame: *mut core::ffi::c_void,
pub EndMoCompFrame: *mut core::ffi::c_void,
pub RenderMoComp: *mut core::ffi::c_void,
pub QueryMoCompStatus: *mut core::ffi::c_void,
pub DestroyMoComp: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type DDHAL_DDMOTIONCOMPCALLBACKS struct {
dwSize uint32
dwFlags uint32
GetMoCompGuids uintptr
GetMoCompFormats uintptr
CreateMoComp uintptr
GetMoCompBuffInfo uintptr
GetInternalMoCompInfo uintptr
BeginMoCompFrame uintptr
EndMoCompFrame uintptr
RenderMoComp uintptr
QueryMoCompStatus uintptr
DestroyMoComp uintptr
}type
DDHAL_DDMOTIONCOMPCALLBACKS = record
dwSize: DWORD;
dwFlags: DWORD;
GetMoCompGuids: Pointer;
GetMoCompFormats: Pointer;
CreateMoComp: Pointer;
GetMoCompBuffInfo: Pointer;
GetInternalMoCompInfo: Pointer;
BeginMoCompFrame: Pointer;
EndMoCompFrame: Pointer;
RenderMoComp: Pointer;
QueryMoCompStatus: Pointer;
DestroyMoComp: Pointer;
end;const DDHAL_DDMOTIONCOMPCALLBACKS = extern struct {
dwSize: u32,
dwFlags: u32,
GetMoCompGuids: ?*anyopaque,
GetMoCompFormats: ?*anyopaque,
CreateMoComp: ?*anyopaque,
GetMoCompBuffInfo: ?*anyopaque,
GetInternalMoCompInfo: ?*anyopaque,
BeginMoCompFrame: ?*anyopaque,
EndMoCompFrame: ?*anyopaque,
RenderMoComp: ?*anyopaque,
QueryMoCompStatus: ?*anyopaque,
DestroyMoComp: ?*anyopaque,
};type
DDHAL_DDMOTIONCOMPCALLBACKS {.bycopy.} = object
dwSize: uint32
dwFlags: uint32
GetMoCompGuids: pointer
GetMoCompFormats: pointer
CreateMoComp: pointer
GetMoCompBuffInfo: pointer
GetInternalMoCompInfo: pointer
BeginMoCompFrame: pointer
EndMoCompFrame: pointer
RenderMoComp: pointer
QueryMoCompStatus: pointer
DestroyMoComp: pointerstruct DDHAL_DDMOTIONCOMPCALLBACKS
{
uint dwSize;
uint dwFlags;
void* GetMoCompGuids;
void* GetMoCompFormats;
void* CreateMoComp;
void* GetMoCompBuffInfo;
void* GetInternalMoCompInfo;
void* BeginMoCompFrame;
void* EndMoCompFrame;
void* RenderMoComp;
void* QueryMoCompStatus;
void* DestroyMoComp;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DDHAL_DDMOTIONCOMPCALLBACKS サイズ: 48 バイト(x86)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; GetMoCompGuids : LPDDHALMOCOMPCB_GETGUIDS (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; GetMoCompFormats : LPDDHALMOCOMPCB_GETFORMATS (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CreateMoComp : LPDDHALMOCOMPCB_CREATE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; GetMoCompBuffInfo : LPDDHALMOCOMPCB_GETCOMPBUFFINFO (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; GetInternalMoCompInfo : LPDDHALMOCOMPCB_GETINTERNALINFO (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; BeginMoCompFrame : LPDDHALMOCOMPCB_BEGINFRAME (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; EndMoCompFrame : LPDDHALMOCOMPCB_ENDFRAME (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; RenderMoComp : LPDDHALMOCOMPCB_RENDER (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; QueryMoCompStatus : LPDDHALMOCOMPCB_QUERYSTATUS (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; DestroyMoComp : LPDDHALMOCOMPCB_DESTROY (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DDHAL_DDMOTIONCOMPCALLBACKS サイズ: 88 バイト(x64)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; GetMoCompGuids : LPDDHALMOCOMPCB_GETGUIDS (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; GetMoCompFormats : LPDDHALMOCOMPCB_GETFORMATS (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; CreateMoComp : LPDDHALMOCOMPCB_CREATE (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; GetMoCompBuffInfo : LPDDHALMOCOMPCB_GETCOMPBUFFINFO (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; GetInternalMoCompInfo : LPDDHALMOCOMPCB_GETINTERNALINFO (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; BeginMoCompFrame : LPDDHALMOCOMPCB_BEGINFRAME (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; EndMoCompFrame : LPDDHALMOCOMPCB_ENDFRAME (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; RenderMoComp : LPDDHALMOCOMPCB_RENDER (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; QueryMoCompStatus : LPDDHALMOCOMPCB_QUERYSTATUS (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; DestroyMoComp : LPDDHALMOCOMPCB_DESTROY (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DDHAL_DDMOTIONCOMPCALLBACKS
#field int dwSize
#field int dwFlags
#field intptr GetMoCompGuids
#field intptr GetMoCompFormats
#field intptr CreateMoComp
#field intptr GetMoCompBuffInfo
#field intptr GetInternalMoCompInfo
#field intptr BeginMoCompFrame
#field intptr EndMoCompFrame
#field intptr RenderMoComp
#field intptr QueryMoCompStatus
#field intptr DestroyMoComp
#endstruct
stdim st, DDHAL_DDMOTIONCOMPCALLBACKS ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize