ホーム › Graphics.DirectDraw › DD_BLTDATA
DD_BLTDATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| lpDD | DD_DIRECTDRAW_GLOBAL* | 8/4 | +0 | +0 | 対象のDirectDrawグローバルオブジェクトへのポインタ。 |
| lpDDDestSurface | DD_SURFACE_LOCAL* | 8/4 | +8 | +4 | Blt転送先サーフェスのローカルオブジェクトへのポインタ。 |
| rDest | RECTL | 16 | +16 | +8 | 転送先矩形を示すRECTL。 |
| lpDDSrcSurface | DD_SURFACE_LOCAL* | 8/4 | +32 | +24 | Blt転送元サーフェスのローカルオブジェクトへのポインタ。NULL可。 |
| rSrc | RECTL | 16 | +40 | +28 | 転送元矩形を示すRECTL。 |
| dwFlags | DWORD | 4 | +56 | +44 | Blt動作を制御するDDBLT_系フラグ。 |
| dwROPFlags | DWORD | 4 | +60 | +48 | 使用するラスタオペレーションを示すフラグ。 |
| bltFX | DDBLTFX | 128/100 | +64 | +52 | Bltの特殊効果パラメータを示すDDBLTFX。 |
| ddRVal | HRESULT | 4 | +192 | +152 | 操作の結果を示すHRESULT。成功時はDD_OK。 |
| Blt | void* | 8/4 | +200 | +156 | Blt処理を行うコールバック関数へのポインタ。 |
| IsClipped | BOOL | 4 | +208 | +160 | 転送がクリッピングされたかを示すブール値。 |
| rOrigDest | RECTL | 16 | +212 | +164 | クリッピング前の元の転送先矩形を示すRECTL。 |
| rOrigSrc | RECTL | 16 | +228 | +180 | クリッピング前の元の転送元矩形を示すRECTL。 |
| dwRectCnt | DWORD | 4 | +244 | +196 | prDestRectsが指す転送先矩形の個数。 |
| prDestRects | RECT* | 8/4 | +248 | +200 | クリッピングされた転送先矩形の配列へのポインタ。 |
| dwAFlags | DWORD | 4 | +256 | +204 | アルファブレンド動作を制御するフラグ。 |
| ddargbScaleFactors | DDARGB | 4 | +260 | +208 | ARGB各成分のスケーリング係数を示すDDARGB。 |
各言語での定義
#include <windows.h>
// RECTL (x64 16 / x86 16 バイト)
typedef struct RECTL {
INT left;
INT top;
INT right;
INT bottom;
} RECTL;
// DDCOLORKEY (x64 8 / x86 8 バイト)
typedef struct DDCOLORKEY {
DWORD dwColorSpaceLowValue;
DWORD dwColorSpaceHighValue;
} DDCOLORKEY;
// DDBLTFX (x64 128 / x86 100 バイト)
typedef struct DDBLTFX {
DWORD dwSize;
DWORD dwDDFX;
DWORD dwROP;
DWORD dwDDROP;
DWORD dwRotationAngle;
DWORD dwZBufferOpCode;
DWORD dwZBufferLow;
DWORD dwZBufferHigh;
DWORD dwZBufferBaseDest;
DWORD dwZDestConstBitDepth;
_Anonymous1_e__Union Anonymous1;
DWORD dwZSrcConstBitDepth;
_Anonymous2_e__Union Anonymous2;
DWORD dwAlphaEdgeBlendBitDepth;
DWORD dwAlphaEdgeBlend;
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth;
_Anonymous3_e__Union Anonymous3;
DWORD dwAlphaSrcConstBitDepth;
_Anonymous4_e__Union Anonymous4;
_Anonymous5_e__Union Anonymous5;
DDCOLORKEY ddckDestColorkey;
DDCOLORKEY ddckSrcColorkey;
} DDBLTFX;
// DDARGB (x64 4 / x86 4 バイト)
typedef struct DDARGB {
BYTE blue;
BYTE green;
BYTE red;
BYTE alpha;
} DDARGB;
// DD_BLTDATA (x64 264 / x86 212 バイト)
typedef struct DD_BLTDATA {
DD_DIRECTDRAW_GLOBAL* lpDD;
DD_SURFACE_LOCAL* lpDDDestSurface;
RECTL rDest;
DD_SURFACE_LOCAL* lpDDSrcSurface;
RECTL rSrc;
DWORD dwFlags;
DWORD dwROPFlags;
DDBLTFX bltFX;
HRESULT ddRVal;
void* Blt;
BOOL IsClipped;
RECTL rOrigDest;
RECTL rOrigSrc;
DWORD dwRectCnt;
RECT* prDestRects;
DWORD dwAFlags;
DDARGB ddargbScaleFactors;
} DD_BLTDATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RECTL
{
public int left;
public int top;
public int right;
public int bottom;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDCOLORKEY
{
public uint dwColorSpaceLowValue;
public uint dwColorSpaceHighValue;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDBLTFX
{
public uint dwSize;
public uint dwDDFX;
public uint dwROP;
public uint dwDDROP;
public uint dwRotationAngle;
public uint dwZBufferOpCode;
public uint dwZBufferLow;
public uint dwZBufferHigh;
public uint dwZBufferBaseDest;
public uint dwZDestConstBitDepth;
public _Anonymous1_e__Union Anonymous1;
public uint dwZSrcConstBitDepth;
public _Anonymous2_e__Union Anonymous2;
public uint dwAlphaEdgeBlendBitDepth;
public uint dwAlphaEdgeBlend;
public uint dwReserved;
public uint dwAlphaDestConstBitDepth;
public _Anonymous3_e__Union Anonymous3;
public uint dwAlphaSrcConstBitDepth;
public _Anonymous4_e__Union Anonymous4;
public _Anonymous5_e__Union Anonymous5;
public DDCOLORKEY ddckDestColorkey;
public DDCOLORKEY ddckSrcColorkey;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DDARGB
{
public byte blue;
public byte green;
public byte red;
public byte alpha;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DD_BLTDATA
{
public IntPtr lpDD;
public IntPtr lpDDDestSurface;
public RECTL rDest;
public IntPtr lpDDSrcSurface;
public RECTL rSrc;
public uint dwFlags;
public uint dwROPFlags;
public DDBLTFX bltFX;
public int ddRVal;
public IntPtr Blt;
[MarshalAs(UnmanagedType.Bool)] public bool IsClipped;
public RECTL rOrigDest;
public RECTL rOrigSrc;
public uint dwRectCnt;
public IntPtr prDestRects;
public uint dwAFlags;
public DDARGB ddargbScaleFactors;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RECTL
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDCOLORKEY
Public dwColorSpaceLowValue As UInteger
Public dwColorSpaceHighValue As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDBLTFX
Public dwSize As UInteger
Public dwDDFX As UInteger
Public dwROP As UInteger
Public dwDDROP As UInteger
Public dwRotationAngle As UInteger
Public dwZBufferOpCode As UInteger
Public dwZBufferLow As UInteger
Public dwZBufferHigh As UInteger
Public dwZBufferBaseDest As UInteger
Public dwZDestConstBitDepth As UInteger
Public Anonymous1 As _Anonymous1_e__Union
Public dwZSrcConstBitDepth As UInteger
Public Anonymous2 As _Anonymous2_e__Union
Public dwAlphaEdgeBlendBitDepth As UInteger
Public dwAlphaEdgeBlend As UInteger
Public dwReserved As UInteger
Public dwAlphaDestConstBitDepth As UInteger
Public Anonymous3 As _Anonymous3_e__Union
Public dwAlphaSrcConstBitDepth As UInteger
Public Anonymous4 As _Anonymous4_e__Union
Public Anonymous5 As _Anonymous5_e__Union
Public ddckDestColorkey As DDCOLORKEY
Public ddckSrcColorkey As DDCOLORKEY
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DDARGB
Public blue As Byte
Public green As Byte
Public red As Byte
Public alpha As Byte
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DD_BLTDATA
Public lpDD As IntPtr
Public lpDDDestSurface As IntPtr
Public rDest As RECTL
Public lpDDSrcSurface As IntPtr
Public rSrc As RECTL
Public dwFlags As UInteger
Public dwROPFlags As UInteger
Public bltFX As DDBLTFX
Public ddRVal As Integer
Public Blt As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public IsClipped As Boolean
Public rOrigDest As RECTL
Public rOrigSrc As RECTL
Public dwRectCnt As UInteger
Public prDestRects As IntPtr
Public dwAFlags As UInteger
Public ddargbScaleFactors As DDARGB
End Structureimport ctypes
from ctypes import wintypes
class RECTL(ctypes.Structure):
_fields_ = [
("left", ctypes.c_int),
("top", ctypes.c_int),
("right", ctypes.c_int),
("bottom", ctypes.c_int),
]
class DDCOLORKEY(ctypes.Structure):
_fields_ = [
("dwColorSpaceLowValue", wintypes.DWORD),
("dwColorSpaceHighValue", wintypes.DWORD),
]
class DDBLTFX(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwDDFX", wintypes.DWORD),
("dwROP", wintypes.DWORD),
("dwDDROP", wintypes.DWORD),
("dwRotationAngle", wintypes.DWORD),
("dwZBufferOpCode", wintypes.DWORD),
("dwZBufferLow", wintypes.DWORD),
("dwZBufferHigh", wintypes.DWORD),
("dwZBufferBaseDest", wintypes.DWORD),
("dwZDestConstBitDepth", wintypes.DWORD),
("Anonymous1", _Anonymous1_e__Union),
("dwZSrcConstBitDepth", wintypes.DWORD),
("Anonymous2", _Anonymous2_e__Union),
("dwAlphaEdgeBlendBitDepth", wintypes.DWORD),
("dwAlphaEdgeBlend", wintypes.DWORD),
("dwReserved", wintypes.DWORD),
("dwAlphaDestConstBitDepth", wintypes.DWORD),
("Anonymous3", _Anonymous3_e__Union),
("dwAlphaSrcConstBitDepth", wintypes.DWORD),
("Anonymous4", _Anonymous4_e__Union),
("Anonymous5", _Anonymous5_e__Union),
("ddckDestColorkey", DDCOLORKEY),
("ddckSrcColorkey", DDCOLORKEY),
]
class DDARGB(ctypes.Structure):
_fields_ = [
("blue", ctypes.c_ubyte),
("green", ctypes.c_ubyte),
("red", ctypes.c_ubyte),
("alpha", ctypes.c_ubyte),
]
class DD_BLTDATA(ctypes.Structure):
_fields_ = [
("lpDD", ctypes.c_void_p),
("lpDDDestSurface", ctypes.c_void_p),
("rDest", RECTL),
("lpDDSrcSurface", ctypes.c_void_p),
("rSrc", RECTL),
("dwFlags", wintypes.DWORD),
("dwROPFlags", wintypes.DWORD),
("bltFX", DDBLTFX),
("ddRVal", ctypes.c_int),
("Blt", ctypes.c_void_p),
("IsClipped", wintypes.BOOL),
("rOrigDest", RECTL),
("rOrigSrc", RECTL),
("dwRectCnt", wintypes.DWORD),
("prDestRects", ctypes.c_void_p),
("dwAFlags", wintypes.DWORD),
("ddargbScaleFactors", DDARGB),
]#[repr(C)]
pub struct RECTL {
pub left: i32,
pub top: i32,
pub right: i32,
pub bottom: i32,
}
#[repr(C)]
pub struct DDCOLORKEY {
pub dwColorSpaceLowValue: u32,
pub dwColorSpaceHighValue: u32,
}
#[repr(C)]
pub struct DDBLTFX {
pub dwSize: u32,
pub dwDDFX: u32,
pub dwROP: u32,
pub dwDDROP: u32,
pub dwRotationAngle: u32,
pub dwZBufferOpCode: u32,
pub dwZBufferLow: u32,
pub dwZBufferHigh: u32,
pub dwZBufferBaseDest: u32,
pub dwZDestConstBitDepth: u32,
pub Anonymous1: _Anonymous1_e__Union,
pub dwZSrcConstBitDepth: u32,
pub Anonymous2: _Anonymous2_e__Union,
pub dwAlphaEdgeBlendBitDepth: u32,
pub dwAlphaEdgeBlend: u32,
pub dwReserved: u32,
pub dwAlphaDestConstBitDepth: u32,
pub Anonymous3: _Anonymous3_e__Union,
pub dwAlphaSrcConstBitDepth: u32,
pub Anonymous4: _Anonymous4_e__Union,
pub Anonymous5: _Anonymous5_e__Union,
pub ddckDestColorkey: DDCOLORKEY,
pub ddckSrcColorkey: DDCOLORKEY,
}
#[repr(C)]
pub struct DDARGB {
pub blue: u8,
pub green: u8,
pub red: u8,
pub alpha: u8,
}
#[repr(C)]
pub struct DD_BLTDATA {
pub lpDD: *mut core::ffi::c_void,
pub lpDDDestSurface: *mut core::ffi::c_void,
pub rDest: RECTL,
pub lpDDSrcSurface: *mut core::ffi::c_void,
pub rSrc: RECTL,
pub dwFlags: u32,
pub dwROPFlags: u32,
pub bltFX: DDBLTFX,
pub ddRVal: i32,
pub Blt: *mut core::ffi::c_void,
pub IsClipped: i32,
pub rOrigDest: RECTL,
pub rOrigSrc: RECTL,
pub dwRectCnt: u32,
pub prDestRects: *mut core::ffi::c_void,
pub dwAFlags: u32,
pub ddargbScaleFactors: DDARGB,
}import "golang.org/x/sys/windows"
type RECTL struct {
left int32
top int32
right int32
bottom int32
}
type DDCOLORKEY struct {
dwColorSpaceLowValue uint32
dwColorSpaceHighValue uint32
}
type DDBLTFX struct {
dwSize uint32
dwDDFX uint32
dwROP uint32
dwDDROP uint32
dwRotationAngle uint32
dwZBufferOpCode uint32
dwZBufferLow uint32
dwZBufferHigh uint32
dwZBufferBaseDest uint32
dwZDestConstBitDepth uint32
Anonymous1 _Anonymous1_e__Union
dwZSrcConstBitDepth uint32
Anonymous2 _Anonymous2_e__Union
dwAlphaEdgeBlendBitDepth uint32
dwAlphaEdgeBlend uint32
dwReserved uint32
dwAlphaDestConstBitDepth uint32
Anonymous3 _Anonymous3_e__Union
dwAlphaSrcConstBitDepth uint32
Anonymous4 _Anonymous4_e__Union
Anonymous5 _Anonymous5_e__Union
ddckDestColorkey DDCOLORKEY
ddckSrcColorkey DDCOLORKEY
}
type DDARGB struct {
blue byte
green byte
red byte
alpha byte
}
type DD_BLTDATA struct {
lpDD uintptr
lpDDDestSurface uintptr
rDest RECTL
lpDDSrcSurface uintptr
rSrc RECTL
dwFlags uint32
dwROPFlags uint32
bltFX DDBLTFX
ddRVal int32
Blt uintptr
IsClipped int32
rOrigDest RECTL
rOrigSrc RECTL
dwRectCnt uint32
prDestRects uintptr
dwAFlags uint32
ddargbScaleFactors DDARGB
}type
RECTL = record
left: Integer;
top: Integer;
right: Integer;
bottom: Integer;
end;
DDCOLORKEY = record
dwColorSpaceLowValue: DWORD;
dwColorSpaceHighValue: DWORD;
end;
DDBLTFX = record
dwSize: DWORD;
dwDDFX: DWORD;
dwROP: DWORD;
dwDDROP: DWORD;
dwRotationAngle: DWORD;
dwZBufferOpCode: DWORD;
dwZBufferLow: DWORD;
dwZBufferHigh: DWORD;
dwZBufferBaseDest: DWORD;
dwZDestConstBitDepth: DWORD;
Anonymous1: _Anonymous1_e__Union;
dwZSrcConstBitDepth: DWORD;
Anonymous2: _Anonymous2_e__Union;
dwAlphaEdgeBlendBitDepth: DWORD;
dwAlphaEdgeBlend: DWORD;
dwReserved: DWORD;
dwAlphaDestConstBitDepth: DWORD;
Anonymous3: _Anonymous3_e__Union;
dwAlphaSrcConstBitDepth: DWORD;
Anonymous4: _Anonymous4_e__Union;
Anonymous5: _Anonymous5_e__Union;
ddckDestColorkey: DDCOLORKEY;
ddckSrcColorkey: DDCOLORKEY;
end;
DDARGB = record
blue: Byte;
green: Byte;
red: Byte;
alpha: Byte;
end;
DD_BLTDATA = record
lpDD: Pointer;
lpDDDestSurface: Pointer;
rDest: RECTL;
lpDDSrcSurface: Pointer;
rSrc: RECTL;
dwFlags: DWORD;
dwROPFlags: DWORD;
bltFX: DDBLTFX;
ddRVal: Integer;
Blt: Pointer;
IsClipped: BOOL;
rOrigDest: RECTL;
rOrigSrc: RECTL;
dwRectCnt: DWORD;
prDestRects: Pointer;
dwAFlags: DWORD;
ddargbScaleFactors: DDARGB;
end;const RECTL = extern struct {
left: i32,
top: i32,
right: i32,
bottom: i32,
};
const DDCOLORKEY = extern struct {
dwColorSpaceLowValue: u32,
dwColorSpaceHighValue: u32,
};
const DDBLTFX = extern struct {
dwSize: u32,
dwDDFX: u32,
dwROP: u32,
dwDDROP: u32,
dwRotationAngle: u32,
dwZBufferOpCode: u32,
dwZBufferLow: u32,
dwZBufferHigh: u32,
dwZBufferBaseDest: u32,
dwZDestConstBitDepth: u32,
Anonymous1: _Anonymous1_e__Union,
dwZSrcConstBitDepth: u32,
Anonymous2: _Anonymous2_e__Union,
dwAlphaEdgeBlendBitDepth: u32,
dwAlphaEdgeBlend: u32,
dwReserved: u32,
dwAlphaDestConstBitDepth: u32,
Anonymous3: _Anonymous3_e__Union,
dwAlphaSrcConstBitDepth: u32,
Anonymous4: _Anonymous4_e__Union,
Anonymous5: _Anonymous5_e__Union,
ddckDestColorkey: DDCOLORKEY,
ddckSrcColorkey: DDCOLORKEY,
};
const DDARGB = extern struct {
blue: u8,
green: u8,
red: u8,
alpha: u8,
};
const DD_BLTDATA = extern struct {
lpDD: ?*anyopaque,
lpDDDestSurface: ?*anyopaque,
rDest: RECTL,
lpDDSrcSurface: ?*anyopaque,
rSrc: RECTL,
dwFlags: u32,
dwROPFlags: u32,
bltFX: DDBLTFX,
ddRVal: i32,
Blt: ?*anyopaque,
IsClipped: i32,
rOrigDest: RECTL,
rOrigSrc: RECTL,
dwRectCnt: u32,
prDestRects: ?*anyopaque,
dwAFlags: u32,
ddargbScaleFactors: DDARGB,
};type
RECTL {.bycopy.} = object
left: int32
top: int32
right: int32
bottom: int32
DDCOLORKEY {.bycopy.} = object
dwColorSpaceLowValue: uint32
dwColorSpaceHighValue: uint32
DDBLTFX {.bycopy.} = object
dwSize: uint32
dwDDFX: uint32
dwROP: uint32
dwDDROP: uint32
dwRotationAngle: uint32
dwZBufferOpCode: uint32
dwZBufferLow: uint32
dwZBufferHigh: uint32
dwZBufferBaseDest: uint32
dwZDestConstBitDepth: uint32
Anonymous1: _Anonymous1_e__Union
dwZSrcConstBitDepth: uint32
Anonymous2: _Anonymous2_e__Union
dwAlphaEdgeBlendBitDepth: uint32
dwAlphaEdgeBlend: uint32
dwReserved: uint32
dwAlphaDestConstBitDepth: uint32
Anonymous3: _Anonymous3_e__Union
dwAlphaSrcConstBitDepth: uint32
Anonymous4: _Anonymous4_e__Union
Anonymous5: _Anonymous5_e__Union
ddckDestColorkey: DDCOLORKEY
ddckSrcColorkey: DDCOLORKEY
DDARGB {.bycopy.} = object
blue: uint8
green: uint8
red: uint8
alpha: uint8
DD_BLTDATA {.bycopy.} = object
lpDD: pointer
lpDDDestSurface: pointer
rDest: RECTL
lpDDSrcSurface: pointer
rSrc: RECTL
dwFlags: uint32
dwROPFlags: uint32
bltFX: DDBLTFX
ddRVal: int32
Blt: pointer
IsClipped: int32
rOrigDest: RECTL
rOrigSrc: RECTL
dwRectCnt: uint32
prDestRects: pointer
dwAFlags: uint32
ddargbScaleFactors: DDARGBstruct RECTL
{
int left;
int top;
int right;
int bottom;
}
struct DDCOLORKEY
{
uint dwColorSpaceLowValue;
uint dwColorSpaceHighValue;
}
struct DDBLTFX
{
uint dwSize;
uint dwDDFX;
uint dwROP;
uint dwDDROP;
uint dwRotationAngle;
uint dwZBufferOpCode;
uint dwZBufferLow;
uint dwZBufferHigh;
uint dwZBufferBaseDest;
uint dwZDestConstBitDepth;
_Anonymous1_e__Union Anonymous1;
uint dwZSrcConstBitDepth;
_Anonymous2_e__Union Anonymous2;
uint dwAlphaEdgeBlendBitDepth;
uint dwAlphaEdgeBlend;
uint dwReserved;
uint dwAlphaDestConstBitDepth;
_Anonymous3_e__Union Anonymous3;
uint dwAlphaSrcConstBitDepth;
_Anonymous4_e__Union Anonymous4;
_Anonymous5_e__Union Anonymous5;
DDCOLORKEY ddckDestColorkey;
DDCOLORKEY ddckSrcColorkey;
}
struct DDARGB
{
ubyte blue;
ubyte green;
ubyte red;
ubyte alpha;
}
struct DD_BLTDATA
{
void* lpDD;
void* lpDDDestSurface;
RECTL rDest;
void* lpDDSrcSurface;
RECTL rSrc;
uint dwFlags;
uint dwROPFlags;
DDBLTFX bltFX;
int ddRVal;
void* Blt;
int IsClipped;
RECTL rOrigDest;
RECTL rOrigSrc;
uint dwRectCnt;
void* prDestRects;
uint dwAFlags;
DDARGB ddargbScaleFactors;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DD_BLTDATA サイズ: 212 バイト(x86)
dim st, 53 ; 4byte整数×53(構造体サイズ 212 / 4 切り上げ)
; lpDD : DD_DIRECTDRAW_GLOBAL* (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; lpDDDestSurface : DD_SURFACE_LOCAL* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; rDest : RECTL (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; lpDDSrcSurface : DD_SURFACE_LOCAL* (+24, 4byte) varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; rSrc : RECTL (+28, 16byte) varptr(st)+28 を基点に操作(16byte:入れ子/配列)
; dwFlags : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; dwROPFlags : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; bltFX : DDBLTFX (+52, 100byte) varptr(st)+52 を基点に操作(100byte:入れ子/配列)
; ddRVal : HRESULT (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; Blt : void* (+156, 4byte) st.39 = 値 / 値 = st.39 (lpoke/lpeek も可)
; IsClipped : BOOL (+160, 4byte) st.40 = 値 / 値 = st.40 (lpoke/lpeek も可)
; rOrigDest : RECTL (+164, 16byte) varptr(st)+164 を基点に操作(16byte:入れ子/配列)
; rOrigSrc : RECTL (+180, 16byte) varptr(st)+180 を基点に操作(16byte:入れ子/配列)
; dwRectCnt : DWORD (+196, 4byte) st.49 = 値 / 値 = st.49 (lpoke/lpeek も可)
; prDestRects : RECT* (+200, 4byte) varptr(st)+200 を基点に操作(4byte:入れ子/配列)
; dwAFlags : DWORD (+204, 4byte) st.51 = 値 / 値 = st.51 (lpoke/lpeek も可)
; ddargbScaleFactors : DDARGB (+208, 4byte) varptr(st)+208 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DD_BLTDATA サイズ: 264 バイト(x64)
dim st, 66 ; 4byte整数×66(構造体サイズ 264 / 4 切り上げ)
; lpDD : DD_DIRECTDRAW_GLOBAL* (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; lpDDDestSurface : DD_SURFACE_LOCAL* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; rDest : RECTL (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; lpDDSrcSurface : DD_SURFACE_LOCAL* (+32, 8byte) varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; rSrc : RECTL (+40, 16byte) varptr(st)+40 を基点に操作(16byte:入れ子/配列)
; dwFlags : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; dwROPFlags : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; bltFX : DDBLTFX (+64, 128byte) varptr(st)+64 を基点に操作(128byte:入れ子/配列)
; ddRVal : HRESULT (+192, 4byte) st.48 = 値 / 値 = st.48 (lpoke/lpeek も可)
; Blt : void* (+200, 8byte) qpoke st,200,値 / qpeek(st,200) ※IronHSPのみ。3.7/3.8は lpoke st,200,下位 : lpoke st,204,上位
; IsClipped : BOOL (+208, 4byte) st.52 = 値 / 値 = st.52 (lpoke/lpeek も可)
; rOrigDest : RECTL (+212, 16byte) varptr(st)+212 を基点に操作(16byte:入れ子/配列)
; rOrigSrc : RECTL (+228, 16byte) varptr(st)+228 を基点に操作(16byte:入れ子/配列)
; dwRectCnt : DWORD (+244, 4byte) st.61 = 値 / 値 = st.61 (lpoke/lpeek も可)
; prDestRects : RECT* (+248, 8byte) varptr(st)+248 を基点に操作(8byte:入れ子/配列)
; dwAFlags : DWORD (+256, 4byte) st.64 = 値 / 値 = st.64 (lpoke/lpeek も可)
; ddargbScaleFactors : DDARGB (+260, 4byte) varptr(st)+260 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global RECTL
#field int left
#field int top
#field int right
#field int bottom
#endstruct
#defstruct global DDCOLORKEY
#field int dwColorSpaceLowValue
#field int dwColorSpaceHighValue
#endstruct
#defstruct global DDBLTFX
#field int dwSize
#field int dwDDFX
#field int dwROP
#field int dwDDROP
#field int dwRotationAngle
#field int dwZBufferOpCode
#field int dwZBufferLow
#field int dwZBufferHigh
#field int dwZBufferBaseDest
#field int dwZDestConstBitDepth
#field byte Anonymous1 8
#field int dwZSrcConstBitDepth
#field byte Anonymous2 8
#field int dwAlphaEdgeBlendBitDepth
#field int dwAlphaEdgeBlend
#field int dwReserved
#field int dwAlphaDestConstBitDepth
#field byte Anonymous3 8
#field int dwAlphaSrcConstBitDepth
#field byte Anonymous4 8
#field byte Anonymous5 8
#field DDCOLORKEY ddckDestColorkey
#field DDCOLORKEY ddckSrcColorkey
#endstruct
#defstruct global DDARGB
#field byte blue
#field byte green
#field byte red
#field byte alpha
#endstruct
#defstruct global DD_BLTDATA
#field intptr lpDD
#field intptr lpDDDestSurface
#field RECTL rDest
#field intptr lpDDSrcSurface
#field RECTL rSrc
#field int dwFlags
#field int dwROPFlags
#field DDBLTFX bltFX
#field int ddRVal
#field intptr Blt
#field bool IsClipped
#field RECTL rOrigDest
#field RECTL rOrigSrc
#field int dwRectCnt
#field intptr prDestRects
#field int dwAFlags
#field DDARGB ddargbScaleFactors
#endstruct
stdim st, DD_BLTDATA ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags