dxlib

package module
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 6 Imported by: 0

README

go-dxlib

go言語でDXライブラリを使用するためのパッケージです。
DXライブラリを使うことで簡単にWindowsデスクトップアプリを制作できます。

インストール方法

dxlibのインストールは通常のgoのパッケージと同様にgo getコマンドで取得できます。

go get -u "github.com/sh-miyoshi/dxlib"

使い方

1. DxLib.dllを取得
  • 方法1: DXライブラリの公式サイトのダウンロードページからVisual C#用パッケージをダウンロードし、その中のDxLib_x64.dll(32bit環境ならDxLib.dll)を取得
  • 方法2: このリポジトリのexample/DxLib.dllを取得
2. コードを記述
package main

import (
    "runtime"
    "github.com/sh-miyoshi/dxlib"
)

func init() {
    runtime.LockOSThread()
}

func main() {
    dxlib.Init("DxLib.dll")

    dxlib.ChangeWindowMode(dxlib.TRUE)

    dxlib.DxLib_Init()
    dxlib.SetDrawScreen(dxlib.DX_SCREEN_BACK)

    for dxlib.ScreenFlip() == 0 && dxlib.ProcessMessage() == 0 && dxlib.ClearDrawScreen() == 0 {
        dxlib.DrawString(10, 10, "Hello, world", dxlib.GetColor(255, 255, 255), 0)
    }

    dxlib.DxLib_End()
}
3. 実行

※DXライブラリはWindows向けのアプリケーションなのでWindows環境で実施してください。

go build -o project.exe
.\project.exe

開発方法

1. ファイルを修正

dxlib.go(もしくはdefines.go)を修正する
※dxlib_gen.goファイルは自動生成されるファイルなので直接編集しないでください

2. ライブラリの生成
go generate

Documentation

Index

Constants

View Source
const (
	TRUE  = 1
	FALSE = 0
)

Boolean

View Source
const (
	DX_SCREEN_FRONT     = -4
	DX_SCREEN_BACK      = -2
	DX_SCREEN_WORK      = -3
	DX_SCREEN_TEMPFRONT = -16
	DX_SCREEN_OTHER     = -6

	DX_NONE_GRAPH = -5 // グラフィックなしハンドル
)

描画先画面指定用定義

View Source
const (
	DX_CHECKINPUT_KEY   = 1
	DX_CHECKINPUT_PAD   = 2
	DX_CHECKINPUT_MOUSE = 4
	DX_CHECKINPUT_ALL   = DX_CHECKINPUT_KEY
)

入力タイプ

View Source
const (
	KEY_INPUT_BACK        = 14
	KEY_INPUT_TAB         = 15
	KEY_INPUT_RETURN      = 28
	KEY_INPUT_LSHIFT      = 42
	KEY_INPUT_RSHIFT      = 54
	KEY_INPUT_LCONTROL    = 29
	KEY_INPUT_RCONTROL    = 157
	KEY_INPUT_ESCAPE      = 1
	KEY_INPUT_SPACE       = 57
	KEY_INPUT_PGUP        = 201
	KEY_INPUT_PGDN        = 209
	KEY_INPUT_END         = 207
	KEY_INPUT_HOME        = 199
	KEY_INPUT_LEFT        = 203
	KEY_INPUT_UP          = 200
	KEY_INPUT_RIGHT       = 205
	KEY_INPUT_DOWN        = 208
	KEY_INPUT_INSERT      = 210
	KEY_INPUT_DELETE      = 211
	KEY_INPUT_MINUS       = 12
	KEY_INPUT_YEN         = 125
	KEY_INPUT_PREVTRACK   = 144
	KEY_INPUT_PERIOD      = 52
	KEY_INPUT_SLASH       = 53
	KEY_INPUT_LALT        = 56
	KEY_INPUT_RALT        = 184
	KEY_INPUT_SCROLL      = 70
	KEY_INPUT_SEMICOLON   = 39
	KEY_INPUT_COLON       = 146
	KEY_INPUT_LBRACKET    = 26
	KEY_INPUT_RBRACKET    = 27
	KEY_INPUT_AT          = 145
	KEY_INPUT_BACKSLASH   = 43
	KEY_INPUT_COMMA       = 51
	KEY_INPUT_KANJI       = 148
	KEY_INPUT_CONVERT     = 121
	KEY_INPUT_NOCONVERT   = 123
	KEY_INPUT_KANA        = 112
	KEY_INPUT_APPS        = 221
	KEY_INPUT_CAPSLOCK    = 58
	KEY_INPUT_SYSRQ       = 183
	KEY_INPUT_PAUSE       = 197
	KEY_INPUT_LWIN        = 219
	KEY_INPUT_RWIN        = 220
	KEY_INPUT_NUMLOCK     = 69
	KEY_INPUT_NUMPAD0     = 82
	KEY_INPUT_NUMPAD1     = 79
	KEY_INPUT_NUMPAD2     = 80
	KEY_INPUT_NUMPAD3     = 81
	KEY_INPUT_NUMPAD4     = 75
	KEY_INPUT_NUMPAD5     = 76
	KEY_INPUT_NUMPAD6     = 77
	KEY_INPUT_NUMPAD7     = 71
	KEY_INPUT_NUMPAD8     = 72
	KEY_INPUT_NUMPAD9     = 73
	KEY_INPUT_MULTIPLY    = 55
	KEY_INPUT_ADD         = 78
	KEY_INPUT_SUBTRACT    = 74
	KEY_INPUT_DECIMAL     = 83
	KEY_INPUT_DIVIDE      = 181
	KEY_INPUT_NUMPADENTER = 156
	KEY_INPUT_F1          = 59
	KEY_INPUT_F2          = 60
	KEY_INPUT_F3          = 61
	KEY_INPUT_F4          = 62
	KEY_INPUT_F5          = 63
	KEY_INPUT_F6          = 64
	KEY_INPUT_F7          = 65
	KEY_INPUT_F8          = 66
	KEY_INPUT_F9          = 67
	KEY_INPUT_F10         = 68
	KEY_INPUT_F11         = 87
	KEY_INPUT_F12         = 88
	KEY_INPUT_A           = 30
	KEY_INPUT_B           = 48
	KEY_INPUT_C           = 46
	KEY_INPUT_D           = 32
	KEY_INPUT_E           = 18
	KEY_INPUT_F           = 33
	KEY_INPUT_G           = 34
	KEY_INPUT_H           = 35
	KEY_INPUT_I           = 23
	KEY_INPUT_J           = 36
	KEY_INPUT_K           = 37
	KEY_INPUT_L           = 38
	KEY_INPUT_M           = 50
	KEY_INPUT_N           = 49
	KEY_INPUT_O           = 24
	KEY_INPUT_P           = 25
	KEY_INPUT_Q           = 16
	KEY_INPUT_R           = 19
	KEY_INPUT_S           = 31
	KEY_INPUT_T           = 20
	KEY_INPUT_U           = 22
	KEY_INPUT_V           = 47
	KEY_INPUT_W           = 17
	KEY_INPUT_X           = 45
	KEY_INPUT_Y           = 21
	KEY_INPUT_Z           = 44
	KEY_INPUT_0           = 11
	KEY_INPUT_1           = 2
	KEY_INPUT_2           = 3
	KEY_INPUT_3           = 4
	KEY_INPUT_4           = 5
	KEY_INPUT_5           = 6
	KEY_INPUT_6           = 7
	KEY_INPUT_7           = 8
	KEY_INPUT_8           = 9
	KEY_INPUT_9           = 10
)

キー入力

View Source
const (
	DX_INPUT_PAD1       = 1
	DX_INPUT_PAD2       = 2
	DX_INPUT_PAD3       = 3
	DX_INPUT_PAD4       = 4
	DX_INPUT_PAD5       = 5
	DX_INPUT_PAD6       = 6
	DX_INPUT_PAD7       = 7
	DX_INPUT_PAD8       = 8
	DX_INPUT_PAD9       = 9
	DX_INPUT_PAD10      = 10
	DX_INPUT_PAD11      = 11
	DX_INPUT_PAD12      = 12
	DX_INPUT_PAD13      = 13
	DX_INPUT_PAD14      = 14
	DX_INPUT_PAD15      = 15
	DX_INPUT_PAD16      = 16
	DX_INPUT_KEY        = 4096
	TOUCHINPUTPOINT_MAX = 16
	PAD_INPUT_DOWN      = 1
	PAD_INPUT_LEFT      = 2
	PAD_INPUT_RIGHT     = 4
	PAD_INPUT_UP        = 8
	PAD_INPUT_A         = 16
	PAD_INPUT_B         = 32
	PAD_INPUT_C         = 64
	PAD_INPUT_X         = 128
	PAD_INPUT_Y         = 256
	PAD_INPUT_Z         = 512
	PAD_INPUT_L         = 1024
	PAD_INPUT_R         = 2048
	PAD_INPUT_START     = 4096
	PAD_INPUT_M         = 8192
	PAD_INPUT_D         = 16384
	PAD_INPUT_F         = 32768
	PAD_INPUT_G         = 65536
	PAD_INPUT_H         = 131072
	PAD_INPUT_I         = 262144
	PAD_INPUT_J         = 524288
	PAD_INPUT_K         = 1048576
	PAD_INPUT_LL        = 2097152
	PAD_INPUT_N         = 4194304
	PAD_INPUT_O         = 8388608
	PAD_INPUT_P         = 16777216
	PAD_INPUT_RR        = 33554432
	PAD_INPUT_S         = 67108864
	PAD_INPUT_T         = 134217728
	PAD_INPUT_U         = 268435456
	PAD_INPUT_V         = 536870912
	PAD_INPUT_W         = 1073741824
	PAD_INPUT_XX        = -2147483648
	PAD_INPUT_1         = 16
	PAD_INPUT_2         = 32
	PAD_INPUT_3         = 64
	PAD_INPUT_4         = 128
	PAD_INPUT_5         = 256
	PAD_INPUT_6         = 512
	PAD_INPUT_7         = 1024
	PAD_INPUT_8         = 2048
	PAD_INPUT_9         = 4096
	PAD_INPUT_10        = 8192
	PAD_INPUT_11        = 16384
	PAD_INPUT_12        = 32768
	PAD_INPUT_13        = 65536
	PAD_INPUT_14        = 131072
	PAD_INPUT_15        = 262144
	PAD_INPUT_16        = 524288
	PAD_INPUT_17        = 1048576
	PAD_INPUT_18        = 2097152
	PAD_INPUT_19        = 4194304
	PAD_INPUT_20        = 8388608
	PAD_INPUT_21        = 16777216
	PAD_INPUT_22        = 33554432
	PAD_INPUT_23        = 67108864
	PAD_INPUT_24        = 134217728
	PAD_INPUT_25        = 268435456
	PAD_INPUT_26        = 536870912
	PAD_INPUT_27        = 1073741824
	PAD_INPUT_28        = -2147483648
)

パッド入力

View Source
const (
	XINPUT_BUTTON_DPAD_UP        = 0
	XINPUT_BUTTON_DPAD_DOWN      = 1
	XINPUT_BUTTON_DPAD_LEFT      = 2
	XINPUT_BUTTON_DPAD_RIGHT     = 3
	XINPUT_BUTTON_START          = 4
	XINPUT_BUTTON_BACK           = 5
	XINPUT_BUTTON_LEFT_THUMB     = 6
	XINPUT_BUTTON_RIGHT_THUMB    = 7
	XINPUT_BUTTON_LEFT_SHOULDER  = 8
	XINPUT_BUTTON_RIGHT_SHOULDER = 9
	XINPUT_BUTTON_A              = 12
	XINPUT_BUTTON_B              = 13
	XINPUT_BUTTON_X              = 14
	XINPUT_BUTTON_Y              = 15
)

XInput

View Source
const (
	MOUSE_INPUT_LEFT     = 1
	MOUSE_INPUT_RIGHT    = 2
	MOUSE_INPUT_MIDDLE   = 4
	MOUSE_INPUT_1        = 1
	MOUSE_INPUT_2        = 2
	MOUSE_INPUT_3        = 4
	MOUSE_INPUT_4        = 8
	MOUSE_INPUT_5        = 16
	MOUSE_INPUT_6        = 32
	MOUSE_INPUT_7        = 64
	MOUSE_INPUT_8        = 128
	MOUSE_INPUT_LOG_DOWN = 0
	MOUSE_INPUT_LOG_UP   = 1
)

マウス入力

View Source
const (
	CTRL_CODE_BS        = 8
	CTRL_CODE_TAB       = 9
	CTRL_CODE_CR        = 13
	CTRL_CODE_DEL       = 16
	CTRL_CODE_COPY      = 3
	CTRL_CODE_PASTE     = 22
	CTRL_CODE_CUT       = 24
	CTRL_CODE_ALL       = 1
	CTRL_CODE_LEFT      = 29
	CTRL_CODE_RIGHT     = 28
	CTRL_CODE_UP        = 30
	CTRL_CODE_DOWN      = 31
	CTRL_CODE_HOME      = 26
	CTRL_CODE_END       = 25
	CTRL_CODE_PAGE_UP   = 23
	CTRL_CODE_PAGE_DOWN = 21
	CTRL_CODE_ESC       = 27
	CTRL_CODE_CMP       = 32
)

操作コード ...

View Source
const (
	DX_PLAYTYPE_LOOPBIT = 2
	DX_PLAYTYPE_BACKBIT = 1
	DX_PLAYTYPE_NORMAL  = 0
	DX_PLAYTYPE_BACK    = DX_PLAYTYPE_BACKBIT
	DX_PLAYTYPE_LOOP    = DX_PLAYTYPE_LOOPBIT | DX_PLAYTYPE_BACKBIT
)

音楽プレイタイプ

View Source
const (
	DX_DRAWMODE_NEAREST     = 0
	DX_DRAWMODE_BILINEAR    = 1
	DX_DRAWMODE_ANISOTROPIC = 2
	DX_DRAWMODE_OTHER       = 3
	DX_DRAWMODE_NUM         = 4
)

描画モード

View Source
const (
	DX_MOVIEPLAYTYPE_BCANCEL = 0
	DX_MOVIEPLAYTYPE_NORMAL  = 1
)

動画再生タイプ

View Source
const (
	DX_BLENDMODE_NOBLEND       = 0
	DX_BLENDMODE_ALPHA         = 1
	DX_BLENDMODE_ADD           = 2
	DX_BLENDMODE_SUB           = 3
	DX_BLENDMODE_MUL           = 4
	DX_BLENDMODE_SUB2          = 5
	DX_BLENDMODE_XOR           = 6
	DX_BLENDMODE_DESTCOLOR     = 8
	DX_BLENDMODE_INVDESTCOLOR  = 9
	DX_BLENDMODE_INVSRC        = 10
	DX_BLENDMODE_MULA          = 11
	DX_BLENDMODE_ALPHA_X4      = 12
	DX_BLENDMODE_ADD_X4        = 13
	DX_BLENDMODE_SRCCOLOR      = 14
	DX_BLENDMODE_HALF_ADD      = 15
	DX_BLENDMODE_SUB1          = 16
	DX_BLENDMODE_PMA_ALPHA     = 17
	DX_BLENDMODE_PMA_ADD       = 18
	DX_BLENDMODE_PMA_SUB       = 19
	DX_BLENDMODE_PMA_INVSRC    = 20
	DX_BLENDMODE_PMA_ALPHA_X4  = 21
	DX_BLENDMODE_PMA_ADD_X4    = 22
	DX_BLENDMODE_LIVE2D_ZERO   = 23
	DX_BLENDMODE_LIVE2D_NORMAL = 24
	DX_BLENDMODE_LIVE2D_ADD    = 25
	DX_BLENDMODE_LIVE2D_MULT   = 26
	DX_BLENDMODE_LIVE2D_MASK   = 27
	DX_BLENDMODE_NUM           = 28
)

ブレンドモード

View Source
const (
	DX_FONTTYPE_NORMAL                = 0
	DX_FONTTYPE_EDGE                  = 1
	DX_FONTTYPE_ANTIALIASING          = 2
	DX_FONTTYPE_ANTIALIASING_4X4      = 18
	DX_FONTTYPE_ANTIALIASING_8X8      = 34
	DX_FONTTYPE_ANTIALIASING_EDGE     = 3
	DX_FONTTYPE_ANTIALIASING_EDGE_4X4 = 19
	DX_FONTTYPE_ANTIALIASING_EDGE_8X8 = 35
)

フォントタイプ

Variables

This section is empty.

Functions

func AddFontFile

func AddFontFile(fontFilePath string) *int32

func BltSoftImage

func BltSoftImage(srcX int32, srcY int32, srcSizeX int32, srcSizeY int32, srcSIHandle int32, destX int32, destY int32, destSIHandle int32) int32

func ChangeFont

func ChangeFont(fontName string, opt ...ChangeFontOption) int32

ChangeFont 文字列描画に使用するフォントを変更する

引数

fontName: フォント名
charSet: デフォルト -1

func ChangeFontType

func ChangeFontType(fontType int32) int32

ChangeFontType 文字列描画に使用するフォントのタイプを変更する

func ChangeNextPlayPanSoundMem

func ChangeNextPlayPanSoundMem(panPal int32, soundHandle int32) int32

func ChangeNextPlayVolumeSoundMem

func ChangeNextPlayVolumeSoundMem(volumePal int32, soundHandle int32) int32

func ChangePanSoundMem

func ChangePanSoundMem(panPal int32, soundHandle int32) int32

func ChangeVolumeSoundMem

func ChangeVolumeSoundMem(volumePan int32, soundHandle int32) int32

func ChangeWindowMode

func ChangeWindowMode(flag int32) int32

func CheckHandleASyncLoad

func CheckHandleASyncLoad(handle int32) int32

func CheckHitKey

func CheckHitKey(keyCode int32) int32

func CheckHitKeyAll

func CheckHitKeyAll(checkType int32) int32

func CheckKeyInput

func CheckKeyInput(inputHandle int32) int32

func CheckMusic

func CheckMusic() int32

func CheckSoundFile

func CheckSoundFile() int32

func CheckSoundMem

func CheckSoundMem(soundHandle int32) int32

func ClearDrawScreen

func ClearDrawScreen() int32

func ClearInputCharBuf

func ClearInputCharBuf() int32

func CreateDivGraphFromSoftImage

func CreateDivGraphFromSoftImage(siHandle int32, allnum int32, xnum int32, ynum int32, sizeX int32, sizeY int32, handleBuf []int32) int32

func CreateFontToHandle

func CreateFontToHandle(opt ...CreateFontToHandleOption) int32

CreateFontToHandle 新しいフォントデータを作成

引数

fontName: 作成するフォント名(NULLにするとデフォルトのフォント)
size: サイズ(デフォルト -1)
thick:  太さ(デフォルト -1)
fontType: フォントタイプ(デフォルト -1)
charSet: デフォルト -1
edgeSize: デフォルト -1
italic: デフォルト FALSE
handle: デフォルト -1

func CreateGraphFromSoftImage

func CreateGraphFromSoftImage(siHandle int32) int32

func CreateMaskScreen

func CreateMaskScreen() int32

func DeleteFontToHandle

func DeleteFontToHandle(fontHandle int32) int32

DeleteFontToHandle フォントデータを削除する

func DeleteGraph

func DeleteGraph(grHandle int32) int32

DeleteGraph 指定のグラフィックをメモリ上から削除する

func DeleteKeyInput

func DeleteKeyInput(inputHandle int32) int32

func DeleteMask

func DeleteMask(maskHandle int32) int32

func DeleteMaskScreen

func DeleteMaskScreen() int32

func DeleteSoftImage

func DeleteSoftImage(siHandle int32) int32

func DeleteSoundMem

func DeleteSoundMem(soundHandle int32, logOutFlag int32) int32

func DerivationGraph

func DerivationGraph(srcX int32, srcY int32, width int32, height int32, srcGraphHandle int32) int32

DerivationGraph 指定のグラフィックの指定部分だけを抜き出して新たなグラフィックを作成する

引数

srcX, secY: グラフィック中の抜き出したい矩形の左上座標
width, height: 抜き出すグラフィックのサイズ
srcGraphHandle: グラフィックハンドル

func DrawBlendGraph

func DrawBlendGraph(x int32, y int32, grHandle int32, transFlag int32, blendGraph int32, borderParam int32, borderRange int32) int32

DrawBlendGraph ブレンド画像と通常画像を合成して描画する

引数

x, y: 画像を描画する領域の左上端座標
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)
blendGraph: ブレンド画像ハンドル
borderParam: 境界位置(0~255)
borderRange: 境界幅(指定できる値は1, 64, 128, 255の4つ)

func DrawBox

func DrawBox(x1 int32, y1 int32, x2 int32, y2 int32, color uint32, fillFlag int32) int32

DrawBox 四角形を描画

引数

x1, y1: 四角形の左上の頂点座標
x2, y2: 四角形の右下+1の頂点座標
color: 四角形の色
fillFlag: 四角の中身を塗りつぶすか(TRUEで塗りつぶし)

func DrawBoxAA

func DrawBoxAA(x1 float32, y1 float32, x2 float32, y2 float32, color uint32, fillFlag int32, opt ...DrawBoxAAOption) int32

DrawBoxAA 四角形を描画(アンチエイリアス効果付き)

引数

x1, y1: 四角形の左上の頂点座標
x2, y2: 四角形の右下+1の頂点座標
color: 四角形の色
fillFlag: 四角の中身を塗りつぶすか(TRUEで塗りつぶし)
lineThickness: 文字の太さ(デフォルト: 1.0)

func DrawCircle

func DrawCircle(x int32, y int32, r int32, color uint32, fillFlag int32, opt ...DrawCircleOption) int32

DrawCircle 円を描画

引数

x, y: 円の中心座標
r: 半径
color: 円の色
fillFlag: 塗りつぶすか(TRUEで塗りつぶし)
lineThickness: 文字の太さ(デフォルト: 1)

func DrawCircleAA

func DrawCircleAA(x float32, y float32, r float32, posnum int32, color uint32, fillFlag int32, opt ...DrawCircleAAOption) int32

DrawCircleAA 円を描画(アンチエイリアス効果付き)

引数

x, y: 円の中心座標
r: 半径
posnum: 円を形成する頂点の数
color: 円の色
fillFlag: 塗りつぶすか(TRUEで塗りつぶし)
lineThickness: 文字の太さ(デフォルト: 1.0)

func DrawExtendFormatString

func DrawExtendFormatString(x int32, y int32, exRateX float64, exRateY float64, color uint32, format string, a ...interface{}) int32

func DrawExtendFormatStringToHandle

func DrawExtendFormatStringToHandle(x int32, y int32, exRateX float64, exRateY float64, color uint32, fontHandle int32, format string, a ...interface{}) int32

func DrawExtendGraph

func DrawExtendGraph(x1 int32, y1 int32, x2 int32, y2 int32, grHandle int32, transFlag int32) int32

DrawExtendGraph メモリに読みこんだグラフィックの拡大縮小描画

func DrawExtendString

func DrawExtendString(x int32, y int32, exRateX float64, exRateY float64, str string, color uint32, opt ...DrawExtendStringOption) int32

func DrawExtendStringToHandle

func DrawExtendStringToHandle(x int32, y int32, exRateX float64, exRateY float64, str string, color uint32, fontHandle int32, opt ...DrawExtendStringToHandleOption) int32

func DrawFillMask

func DrawFillMask(x1 int32, y1 int32, x2 int32, y2 int32, maskHandle int32) int32

func DrawFormatString

func DrawFormatString(x int32, y int32, color uint32, format string, a ...interface{}) int32

func DrawFormatStringToHandle

func DrawFormatStringToHandle(x int32, y int32, color uint32, fontHandle int32, format string, a ...interface{}) int32

func DrawGraph

func DrawGraph(x int32, y int32, grHandle int32, transFlag int32) int32

DrawGraph メモリに読みこんだグラフィックの描画

引数

x, y: グラフィックを描画する領域の左上頂点の座標
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)

func DrawKeyInputModeString

func DrawKeyInputModeString(x int32, y int32) int32

func DrawKeyInputString

func DrawKeyInputString(x int32, y int32, inputHandle int32, drawCandidateList int32) int32

func DrawLine

func DrawLine(x1 int32, y1 int32, x2 int32, y2 int32, color uint32, opt ...DrawLineOption) int32

DrawLine 線を描画

引数

x1, y1: 線の起点座標
x2, y2: 線の終点座標
color: 線の色
thickness: 文字の太さ(デフォルト: 1)

func DrawLineAA

func DrawLineAA(x1 float32, y1 float32, x2 float32, y2 float32, color uint32, opt ...DrawLineAAOption) int32

DrawLineAA 線を描画(アンチエイリアス効果付き)

引数

x1, y1: 線の起点座標
x2, y2: 線の終点座標
color: 線の色
thickness: 文字の太さ(デフォルト: 1.0)

func DrawMask

func DrawMask(x int32, y int32, maskHandle int32, transMode int32) int32

func DrawModiGraph

func DrawModiGraph(x1 int32, y1 int32, x2 int32, y2 int32, x3 int32, y3 int32, x4 int32, y4 int32, grHandle int32, transFlag int32) int32

DrawModiGraph メモリに読みこんだグラフィックの自由変形描画

引数

x1, y1, x2, y2, x3, y3, x4, y4: x1から順に描画する画像の左上、右上、右下、左下の頂点の座標
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)

func DrawOval

func DrawOval(x int32, y int32, rx int32, ry int32, color uint32, fillFlag int32, opt ...DrawOvalOption) int32

DrawOval 楕円を描画

引数

x, y: 楕円の中心座標
rx, ry: 描く楕円のX軸に対する半径とY軸に対する半径
color: 円の色
fillFlag: 塗りつぶすか(TRUEで塗りつぶし)
lineThickness: 文字の太さ(デフォルト: 1.0)

func DrawOvalAA

func DrawOvalAA(x float32, y float32, rx float32, ry float32, posnum int32, color uint32, fillFlag int32, opt ...DrawOvalAAOption) int32

DrawOvalAA 楕円を描画(アンチエイリアス効果付き)

引数

x, y: 楕円の中心座標
rx, ry: 描く楕円のX軸に対する半径とY軸に対する半径
posnum: 円を形成する頂点の数
color: 円の色
fillFlag: 塗りつぶすか(TRUEで塗りつぶし)
lineThickness: 文字の太さ(デフォルト: 1.0)

func DrawPixel

func DrawPixel(x int32, y int32, color uint32) int32

DrawPixel 点を描画

引数

x, y: 座標
color: 点の色

func DrawPixelPalCodeSoftImage

func DrawPixelPalCodeSoftImage(siHandle int32, x int32, y int32, palNo int32) int32

func DrawPixelSoftImage

func DrawPixelSoftImage(siHandle int32, x int32, y int32, r int32, g int32, b int32, a int32) int32

func DrawRectGraph

func DrawRectGraph(destX int32, destY int32, srcX int32, srcY int32, width int32, height int32, grHandle int32, transFlag int32, opt ...DrawRectGraphOption) int32

DrawRectGraph グラフィックの指定矩形部分のみを描画

引数

destX, destY: グラフィックを描画する座標
srcX, srcY: 描画するグラフィック上の描画したい矩形の左上座標
width, height: 描画するグラフィックのサイズ
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)
reverseXFlag: 画像の左右反転を行うか
reverseYFlag: 画像の上下反転を行うか

func DrawRotaGraph

func DrawRotaGraph(x int32, y int32, extRate float64, angle float64, grHandle int32, transFlag int32, opt ...DrawRotaGraphOption) int32

DrawRotaGraph メモリに読みこんだグラフィックの回転描画

引数

x, y: グラフィックを描画する領域の中心座標
extRate: 拡大率(1.0で等倍)
angle: 描画角度(ラジアン指定)
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)
reverseXFlag: 画像の左右反転を行うか
reverseYFlag: 画像の上下反転を行うか

func DrawRotaGraph2

func DrawRotaGraph2(x int32, y int32, cx int32, cy int32, extRate float64, angle float64, grHandle int32, transFlag int32, opt ...DrawRotaGraph2Option) int32

DrawRotaGraph2 メモリに読みこんだグラフィックの回転描画(回転中心指定あり)

引数

x, y: グラフィックを描画する領域の中心座標
cx, cy: 画像を回転描画する画像上の中心座標
extRate: 拡大率(1.0で等倍)
angle: 描画角度(ラジアン指定)
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)
reverseXFlag: 画像の左右反転を行うか
reverseYFlag: 画像の上下反転を行うか

func DrawRotaGraph3

func DrawRotaGraph3(x int32, y int32, cx int32, cy int32, extRateX float64, extRateY float64, angle float64, grHandle int32, transFlag int32, opt ...DrawRotaGraph3Option) int32

DrawRotaGraph3 メモリに読みこんだグラフィックの回転描画(回転中心指定あり)

引数

x, y: グラフィックを描画する領域の中心座標
cx, cy: 画像を回転描画する画像上の中心座標
extRateX, exRateY: 拡大率(1.0で等倍)
angle: 描画角度(ラジアン指定)
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)
reverseXFlag: 画像の左右反転を行うか
reverseYFlag: 画像の上下反転を行うか

func DrawRotaGraphFast

func DrawRotaGraphFast(x int32, y int32, extRate float32, angle float32, grHandle int32, transFlag int32, opt ...DrawRotaGraphFastOption) int32

func DrawRotaGraphFast2

func DrawRotaGraphFast2(x int32, y int32, cx int32, cy int32, extRate float32, angle float32, grHandle int32, transFlag int32, opt ...DrawRotaGraphFast2Option) int32

func DrawRotaGraphFast3

func DrawRotaGraphFast3(x int32, y int32, cx int32, cy int32, extRateX float32, extRateY float32, angle float32, grHandle int32, transFlag int32, opt ...DrawRotaGraphFast3Option) int32

func DrawSoftImage

func DrawSoftImage(x int32, y int32, siHandle int32) int32

func DrawString

func DrawString(x int32, y int32, str string, color uint32, opt ...DrawStringOption) int32

DrawString 文字列を描画

引数

x, y: 文字列を描画する領域の左上の座標
str: 文字列
color: 文字列の色
edgeColor: デフォルト 0

func DrawStringToHandle

func DrawStringToHandle(x int32, y int32, str string, color uint32, fontHandle int32, opt ...DrawStringToHandleOption) int32

DrawStringToHandle 指定のフォントデータで文字列を描画する

引数

x, y: 文字列を描画する起点座標
str: 文字列
color: 文字の色
fontHandle: 描画に使用するフォントハンドル
edgeColor: 縁の色(デフォルト 0)
verticalFlag: デフォルト FALSE

func DrawTriangle

func DrawTriangle(x1 int32, y1 int32, x2 int32, y2 int32, x3 int32, y3 int32, color uint32, fillFlag int32) int32

DrawTriangle 三角形の描画

引数

x1, y1, x2, y2, x3, y3: 三角形を描く3つの座標
color: 三角形の色
fillFlag: 塗りつぶすか(TRUEで塗りつぶし)

func DrawTriangleAA

func DrawTriangleAA(x1 float32, y1 float32, x2 float32, y2 float32, x3 float32, y3 float32, color uint32, fillFlag int32, opt ...DrawTriangleAAOption) int32

DrawTriangleAA 三角形の描画(アンチエイリアス効果付き)

引数

x1, y1, x2, y2, x3, y3: 三角形を描く3つの座標
color: 三角形の色
fillFlag: 塗りつぶすか(TRUEで塗りつぶし)
lineThickness: 文字の太さ(デフォルト: 1.0)

func DrawTurnGraph

func DrawTurnGraph(x int32, y int32, grHandle int32, transFlag int32) int32

DrawTurnGraph メモリに読みこんだグラフィックのLR反転描画

引数

x, y: グラフィックを描画する領域の左上頂点の座標
grHandle: グラフィックハンドル
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効にする)

func DrawVString

func DrawVString(x int32, y int32, str string, color uint32, edgeColor uint32) int32

func DrawVStringToHandle

func DrawVStringToHandle(x int32, y int32, str string, color uint32, fontHandle int32, edgeColor uint32) int32

func DuplicateSoundMem

func DuplicateSoundMem(srcSoundHandle int32, bufferNum int32) int32

func DxLib_End

func DxLib_End() int32

func DxLib_Init

func DxLib_Init() int32

func EnumFontName

func EnumFontName(nameBuffer []byte, nameBufferNum int32, japanOnlyFlag int32) int32

func FileRead_close

func FileRead_close(fileHandle int32) int32

func FileRead_eof

func FileRead_eof(fileHandle int32) int32

func FileRead_getc

func FileRead_getc(fileHandle int32) int32

func FileRead_gets

func FileRead_gets(buffer []byte, num int32, fileHandle int32) int32

func FileRead_open

func FileRead_open(filePath string, async int32) int32

func FileRead_seek

func FileRead_seek(fileHandle int32, offset int64, origin int32) int32

func FileRead_size

func FileRead_size(filePath string) int64

func FileRead_tell

func FileRead_tell(fileHandle int32) int64

func FillMaskScreen

func FillMaskScreen(flag int32) int32

func FillSoftImage

func FillSoftImage(siHandle int32, r int32, g int32, b int32, a int32) int32

func Float32Ptr

func Float32Ptr(a float32) *float32

func GetASyncLoadNum

func GetASyncLoadNum() int32

func GetColor

func GetColor(red int32, green int32, blue int32) uint32

func GetColorBitDepth

func GetColorBitDepth() int32

func GetDrawScreenGraph

func GetDrawScreenGraph(x1 int32, y1 int32, x2 int32, y2 int32, grHandle int32, opt ...GetDrawScreenGraphOption) int32

GetDrawScreenGraph 描画先に設定されているグラフィック領域から指定領域のグラフィックを読みこむ

引数

x1, y1: 取得するグラフィック領域(矩形)の左上頂点の座標
x2, y2: 取得するグラフィック領域の右下頂点+1の座標
grHandle: 取り込んだグラフィックを保存出来るサイズのグラフィックを持つハンドル
useClientFlag: デフォルト TRUE

func GetDrawStringWidth

func GetDrawStringWidth(str string, strLen int32, opt ...GetDrawStringWidthOption) int32

GetDrawStringWidth 描画した時の文字列の幅(ドット単位)を得る

引数

str: 文字列
 strLen: 文字列長
 vericalFlag: デフォルト FALSE

func GetDrawStringWidthToHandle

func GetDrawStringWidthToHandle(str string, strLen int32, fontHandle int32, opt ...GetDrawStringWidthToHandleOption) int32

GetDrawStringWidthToHandle 指定のフォントデータで描画する文字列の幅(ドット単位)を得る

引数

str: 文字列
strLen: 文字列長
fontHandle: フォントハンドル
verticalFlag: デフォルト FALSE

func GetFontStateToHandle

func GetFontStateToHandle(fontName string, size *int32, thick *int32, fontHandle int32, fontType *int32, charSet *int32, edgeSize *int32, italic *int32) int32

GetFontStateToHandle 指定のフォントデータの情報を得る

func GetGraphSize

func GetGraphSize(grHandle int32, sizeXBuf *int32, sizeYBuf *int32) int32

GetGraphSize グラフィックのサイズを得る

func GetHitKeyStateAll

func GetHitKeyStateAll(keyStateBuf []byte) int32

func GetInputChar

func GetInputChar(deleteFlag int32) byte

func GetInputCharWait

func GetInputCharWait(deleteFlag int32) byte

func GetJoypadAnalogInput

func GetJoypadAnalogInput(xbuf *int32, ybuf *int32, inputType int32) int32

func GetJoypadInputState

func GetJoypadInputState(inputType int32) int32

func GetJoypadNum

func GetJoypadNum() int32

func GetKeyInputNumber

func GetKeyInputNumber(inputHandle int32) int32

func GetKeyInputString added in v1.3.3

func GetKeyInputString(strBuffer []byte, inputHandle int32) int32

func GetMaskSize

func GetMaskSize(widthBuf *int32, heightBuf *int32, maskHandle int32) int32

func GetMouseInput

func GetMouseInput() int32

func GetMouseInputLog2

func GetMouseInputLog2(button *int32, clickX *int32, clickY *int32, logType *int32, logDelete int32) int32

func GetMousePoint

func GetMousePoint(xbuf *int32, ybuf *int32) int32

func GetMouseWheelRotVol

func GetMouseWheelRotVol(counterReset int32) int32

func GetMovieStateToGraph

func GetMovieStateToGraph(graphHandle int32) int32

func GetNowCount

func GetNowCount(opt ...GetNowCountOption) int32

GetNowCount ミリ秒単位の精度を持つカウンタの現在値を得る

引数

useRDTSCFlag: デフォルト FALSE

func GetNowHiPerformanceCount

func GetNowHiPerformanceCount(opt ...GetNowHiPerformanceCountOption) int64

GetNowHiPerformanceCount GetNowCountの高精度バージョン

引数

useRDTSCFlag: デフォルト FALSE

func GetPaletteSoftImage

func GetPaletteSoftImage(siHandle int32, paletteNo int32, r *int32, g *int32, b *int32, a *int32) int32

func GetPixel

func GetPixel(x int32, y int32) uint32

GetPixel 指定点の色を取得

引数

x, y: 座標

func GetPixelPalCodeSoftImage

func GetPixelPalCodeSoftImage(siHandle int32, x int32, y int32) int32

func GetPixelSoftImage

func GetPixelSoftImage(siHandle int32, x int32, y int32, r *int32, g *int32, b *int32, a *int32) int32

func GetRand

func GetRand(randMax int32) int32

func GetScreenState

func GetScreenState(sizeX *int32, sizeY *int32, colorBitDepth *int32) int32

func GetSoftImageSize

func GetSoftImageSize(siHandle int32, width *int32, height *int32) int32

func GetTouchInput

func GetTouchInput(inputNo int32, positionX *int32, positionY *int32, id *int32, device *int32) int32

func GetTouchInputNum

func GetTouchInputNum() int32

func Init

func Init(dllFile string)

Init method set procs from dllFile. This method must be called at first.

func InitFontToHandle

func InitFontToHandle() int32

InitFontToHandle フォントデータを全て初期化する

func InitGraph

func InitGraph(opt ...InitGraphOption) int32

InitGraph 読みこんだグラフィックデータをすべて削除する

引数

logOutFlag: デフォルト FALSE

func InitKeyInput

func InitKeyInput() int32

func InitMask

func InitMask() int32

func InitSoftImage

func InitSoftImage() int32

func InitSoundMem

func InitSoundMem(logOutFlag int32) int32

func Int32Ptr

func Int32Ptr(a int32) *int32

func KeyInputNumber

func KeyInputNumber(x int32, y int32, maxNum int32, minNum int32, cancelValidFlag int32) int32

func KeyInputSingleCharString

func KeyInputSingleCharString(x int32, y int32, charMaxLength int32, strBuffer []byte, cancelValidFlag int32) int32

func KeyInputString

func KeyInputString(x int32, y int32, charMaxLength int32, strBuffer []byte, cancelValidFlag int32) int32

func LoadARGB8ColorSoftImage

func LoadARGB8ColorSoftImage(fileName string) int32

func LoadBlendGraph

func LoadBlendGraph(fileName string) int32

LoadBlendGraph 画像ファイルからブレンド画像を読み込む

func LoadDivGraph

func LoadDivGraph(fileName string, allnum int32, xnum int32, ynum int32, xsize int32, ysize int32, handleBuf []int32, opt ...LoadDivGraphOption) int32

LoadDivGraph 画像ファイルのメモリへの分割読みこみ

引数

fileName: 画像ファイルパス
allnum: 画像の分割総数
xnum, ynum: 画像の横向きに対する分割数と縦に対する分割数
xsize, ysize: 分割された画像一つの大きさ
handleBuf: グラフィックハンドルを保存するバッファ
notUse3DFlag: 3D機能を制限するか(デフォルト: FALSE)

func LoadDivMask

func LoadDivMask(fileName string, allnum int32, xnum int32, ynum int32, xsize int32, ysize int32, handleBuf []int32) int32

func LoadFontDataToHandle

func LoadFontDataToHandle(fileName string, opt ...LoadFontDataToHandleOption) int32

LoadFontDataToHandle DXフォントデータファイルを読み込む

引数

fileName: ファイル名
edgeSize: 成するフォントの縁の太さ(0を指定すると縁無し)

func LoadGraph

func LoadGraph(fileName string, opt ...LoadGraphOption) int32

LoadGraph 画像ファイルのメモリへの読みこみ、及び動画ファイルのロード

引数

fileName: ファイルパス
notUse3DFlag: 3D機能を制限するか(デフォルト: FALSE)

func LoadGraphScreen

func LoadGraphScreen(x int32, y int32, graphName string, transFlag int32) int32

LoadGraphScreen 画像ファイルを読みこんで画面に表示する

引数

x, y: ロードした画像を描画する矩形の左上頂点の座標
graphName: ロードする画像ファイルパス
transFlag: 画像の透明度を有効にするかどうか(TRUE: 有効)

func LoadMask

func LoadMask(fileName string) int32

func LoadPauseGraph

func LoadPauseGraph(fileName string) int32

func LoadSoftImage

func LoadSoftImage(fileName string) int32

func LoadSoundMem

func LoadSoundMem(fileName string, opt ...LoadSoundMemOption) int32

LoadSoundMem 音ファイルをメモリに読みこむ

引数

fileName: ファイル名
bufferNum: デフォルト 3
unionHandle: デフォルト -1

func LoadXRGB8ColorSoftImage

func LoadXRGB8ColorSoftImage(fileName string) int32

func MakeARGB8ColorSoftImage

func MakeARGB8ColorSoftImage(sizeX int32, sizeY int32) int32

func MakeGraph

func MakeGraph(sizeX int32, sizeY int32, opt ...MakeGraphOption) int32

MakeGraph 空のグラフィックを作成する

引数

sizeX, sizeY: 作成する空グラフィックのサイズ
notUse3DFlag: 3D機能を制限するか(デフォルト: FALSE)

func MakeKeyInput

func MakeKeyInput(maxStrLength int32, cancelValidFlag int32, singleCharOnlyFlag int32, numCharOnlyFlag int32, doubleCharOnlyFlag int32, enableNewLineFlag int32) int32

func MakeMask

func MakeMask(width int32, height int32) int32

func MakePAL8ColorSoftImage

func MakePAL8ColorSoftImage(sizeX int32, sizeY int32, useAlpha int32) int32

func MakeScreen

func MakeScreen(sizeX int32, sizeY int32, useAlphaChannel int32) int32

MakeScreen 描画対象にできるグラフィックを作成する

引数

 sizeX, sizeY: 作成するグラフィックのサイズ
useAlphaChannel: 作成するグラフィックにアルファチャンネルを付けるかどうか(TRUE: つける)

func MakeXRGB8ColorSoftImage

func MakeXRGB8ColorSoftImage(sizeX int32, sizeY int32) int32

func PauseMovieToGraph

func PauseMovieToGraph(graphHandle int32, sysPause int32) int32

func PlayMovie

func PlayMovie(fileName string, exRate int32, playType int32) int32

func PlayMovieToGraph

func PlayMovieToGraph(graphHandle int32, playType int32, sysPlay int32) int32

func PlayMusic

func PlayMusic(fileName string, playType int32) int32

func PlaySoundFile

func PlaySoundFile(fileName string, playType int32) int32

func PlaySoundMem

func PlaySoundMem(soundHandle int32, playType int32, topPositionFlag int32) int32

func ProcessMessage

func ProcessMessage() int32

func ReloadFileGraphAll

func ReloadFileGraphAll() int32

func RemoveFontFile

func RemoveFontFile(fontHandle *int32) int32

func SRand

func SRand(seed int32) int32

func SaveDrawScreen

func SaveDrawScreen(x1 int32, y1 int32, x2 int32, y2 int32, fileName string, saveType int32, jpegQuality int32, jpegSample2x1 int32, pngCompressionLevel int32) int32

func ScreenCopy

func ScreenCopy() int32

func ScreenFlip

func ScreenFlip() int32

func SeekMovieToGraph

func SeekMovieToGraph(graphHandle int32, time int32) int32

func SelectMidiMode

func SelectMidiMode(mode int32) int32

func Set3DPositionSoundMem

func Set3DPositionSoundMem(position VECTOR, soundHandle int32) int32

func Set3DPresetReverbParamSoundMem

func Set3DPresetReverbParamSoundMem(presetNo int32, soundHandle int32) int32

func Set3DPresetReverbParamSoundMemAll

func Set3DPresetReverbParamSoundMemAll(presetNo int32, playSoundOnly int32) int32

func Set3DRadiusSoundMem

func Set3DRadiusSoundMem(radius float32, soundHandle int32) int32

func Set3DSoundListenerPosAndFrontPosAndUpVec

func Set3DSoundListenerPosAndFrontPosAndUpVec(position VECTOR, frontPosition VECTOR, upVector VECTOR) int32

func Set3DSoundListenerPosAndFrontPos_UpVecY

func Set3DSoundListenerPosAndFrontPos_UpVecY(position VECTOR, frontPosition VECTOR) int32

func Set3DSoundListenerVelocity

func Set3DSoundListenerVelocity(velocity VECTOR) int32

func Set3DSoundOneMetre

func Set3DSoundOneMetre(distance float32) int32

func Set3DVelocitySoundMem

func Set3DVelocitySoundMem(velocity VECTOR, soundHandle int32) int32

func SetActiveKeyInput

func SetActiveKeyInput(inputHandle int32) int32

func SetAlwaysRunFlag

func SetAlwaysRunFlag(flag int32) int32

func SetBackgroundColor

func SetBackgroundColor(red int32, green int32, blue int32, alpha int32) int32

func SetCreate3DSoundFlag

func SetCreate3DSoundFlag(flag int32) int32

func SetCreateDrawValidGraphChannelNum

func SetCreateDrawValidGraphChannelNum(channelNum int32) int32

SetCreateDrawValidGraphChannelNum 作成する描画可能なグラフィックのチャンネル数の設定

引数

channelNum: 作成する描画可能なグラフィックのチャンネル数(1, 2, or 4)

func SetCreateDrawValidGraphMultiSample

func SetCreateDrawValidGraphMultiSample(samples int32, quality int32) int32

SetCreateDrawValidGraphMultiSample 描画対象にできるグラフィックのマルチサンプリング設定を行う

func SetCreateGraphColorBitDepth

func SetCreateGraphColorBitDepth(bitDepth int32) int32

SetCreateGraphColorBitDepth 作成するグラフィックのビット深度を設定

引数

bitDepth: ビット震度(16 or 32)

func SetCreateSoundDataType

func SetCreateSoundDataType(soundDataType int32) int32

func SetCreateSoundPitchRate

func SetCreateSoundPitchRate(cents float32) int32

func SetCreateSoundTimeStretchRate

func SetCreateSoundTimeStretchRate(rate float32) int32

func SetCurrentPositionSoundMem

func SetCurrentPositionSoundMem(samplePosition int32, soundHandle int32) int32

func SetDXArchiveExtension

func SetDXArchiveExtension(extension string) int32

func SetDXArchiveKeyString

func SetDXArchiveKeyString(keyString string) int32

func SetDoubleStartValidFlag

func SetDoubleStartValidFlag(flag int32) int32

func SetDrawArea

func SetDrawArea(x1 int32, y1 int32, x2 int32, y2 int32) int32

func SetDrawBlendMode

func SetDrawBlendMode(blendMode int32, pal int32) int32

SetDrawBlendMode 描画の際のブレンドモードをセット

引数

blendMode: 描画ブレンドモード
pal: 描画ブレンドモードのパラメータ(0~255)

func SetDrawBright

func SetDrawBright(redBright int32, greenBright int32, blueBright int32) int32

SetDrawBright 描画輝度をセット

func SetDrawMode

func SetDrawMode(drawMode int32) int32

SetDrawMode 描画モードをセットする

引数

drawMode: 描画モード(DX_DRAWMODE_NEAREST: 標準 or DX_DRAWMODE_BILINEAR)

func SetDrawScreen

func SetDrawScreen(drawScreen int32) int32

func SetDrawValidFloatTypeGraphCreateFlag

func SetDrawValidFloatTypeGraphCreateFlag(flag int32) int32

SetDrawValidFloatTypeGraphCreateFlag 描画可能な浮動小数点型のグラフィックを作成するかどうかの設定(デフォルト: FALSE)

func SetEmulation320x240

func SetEmulation320x240(flag int32) int32

func SetEnableXAudioFlag

func SetEnableXAudioFlag(flag int32) int32

func SetFontCacheUsePremulAlphaFlag

func SetFontCacheUsePremulAlphaFlag(flag int32) int32

SetFontCacheUsePremulAlphaFlag 作成するフォントデータを『乗算済みα』用にするかどうかを設定する

func SetFontSize

func SetFontSize(fontSize int32) int32

SetFontSize フォントのサイズをセットする

func SetFontThickness

func SetFontThickness(thickPal int32) int32

SetFontThickness 描画する文字列の文字の太さをセットする

引数

thickPal: 文字の太さ(0~9, デフォルト 6)

func SetFrequencySoundMem

func SetFrequencySoundMem(frequencyPal int32, soundHandle int32) int32

func SetFullSceneAntiAliasingMode

func SetFullSceneAntiAliasingMode(samples int32, quality int32) int32

func SetFullScreenResolutionMode

func SetFullScreenResolutionMode(resolutionMode int32) int32

func SetFullScreenScalingMode

func SetFullScreenScalingMode(scalingMode int32, fitScaling int32) int32

func SetGraphMode

func SetGraphMode(sizeX int32, sizeY int32, opt ...SetGraphModeOption) int32

SetGraphMode 画面モードの変更

引数

sizeX, sizeY: 画面の解像度(デフォルト 640x480)
colorButNum: カラービット数(DXライブラリの標準色ビット数: 16)
refreshRate: デフォルト 60

func SetJoypadDeadZone

func SetJoypadDeadZone(inputType int32, zone float64) int32

func SetKeyInputNumber

func SetKeyInputNumber(number int32, inputHandle int32) int32

func SetKeyInputString

func SetKeyInputString(str string, inputHandle int32) int32

func SetKeyInputStringColor

func SetKeyInputStringColor(nmlStr uint32, nmlCur uint32, imeStrBack uint32, imeCur uint32, imeLine uint32, imeSelectStr uint32, imeModeStr uint32, nmlStrE uint32, imeSelectStrE uint32, imeModeStrE uint32, imeSelectWinE uint32, imeSelectWinF uint32, selectStrBackColor uint32, selectStrColor uint32, selectStrEdgeColor uint32, imeStr uint32, imeStrE uint32) int32

func SetLoopPosSoundMem

func SetLoopPosSoundMem(loopTime int32, soundHandle int32) int32

func SetLoopSamplePosSoundMem

func SetLoopSamplePosSoundMem(loopSamplePosition int32, soundHandle int32) int32

func SetMainWindowText

func SetMainWindowText(windowText string) int32

func SetMouseDispFlag

func SetMouseDispFlag(dispFlag int32) int32

func SetMousePoint

func SetMousePoint(pointX int32, pointY int32) int32

func SetNextPlay3DPositionSoundMem

func SetNextPlay3DPositionSoundMem(position VECTOR, soundHandle int32) int32

func SetNextPlay3DRadiusSoundMem

func SetNextPlay3DRadiusSoundMem(radius float32, soundHandle int32) int32

func SetNextPlay3DVelocitySoundMem

func SetNextPlay3DVelocitySoundMem(velocity VECTOR, soundHandle int32) int32

func SetOutApplicationLogValidFlag

func SetOutApplicationLogValidFlag(flag int32) int32

func SetPaletteSoftImage

func SetPaletteSoftImage(siHandle int32, paletteNo int32, r int32, g int32, b int32, a int32) int32

func SetTransColor

func SetTransColor(red int32, green int32, blue int32) int32

SetTransColor グラフィックに設定する透過色をセットする

func SetUse3DFlag

func SetUse3DFlag(flag int32) int32

func SetUseASyncLoadFlag

func SetUseASyncLoadFlag(flag int32) int32

func SetUseCharCodeFormat

func SetUseCharCodeFormat(charCodeFormat int32) int32

func SetUseDXArchiveFlag

func SetUseDXArchiveFlag(flag int32) int32

func SetUseDivGraphFlag

func SetUseDivGraphFlag(flag int32) int32

func SetUseMaskScreenFlag

func SetUseMaskScreenFlag(validFlag int32) int32

func SetUsePremulAlphaConvertLoad

func SetUsePremulAlphaConvertLoad(useFlag int32) int32

SetUsePremulAlphaConvertLoad 読み込み時に画像を乗算済みα画像に変換するかを設定(デフォルト: FALSE)

func SetVolumeMusic

func SetVolumeMusic(volume int32) int32

func SetWaitVSyncFlag

func SetWaitVSyncFlag(flag int32) int32

func SetWindowIconID

func SetWindowIconID(id int32) int32

func SetWindowSize added in v1.3.2

func SetWindowSize(width int32, height int32) int32

func SetWindowSizeChangeEnableFlag

func SetWindowSizeChangeEnableFlag(flag int32, fitScreen int32) int32

func SetWindowSizeExtendRate

func SetWindowSizeExtendRate(exRateX float64, exRateY float64) int32

func StartJoypadVibration

func StartJoypadVibration(inputType int32, power int32, time int32) int32

func StopJoypadVibration

func StopJoypadVibration(inputType int32, effectIndex int32) int32

func StopMusic

func StopMusic() int32

func StopSoundFile

func StopSoundFile() int32

func StopSoundMem

func StopSoundMem(soundHandle int32) int32

func StringPtr

func StringPtr(a string) *string

func TellMovieToGraph

func TellMovieToGraph(graphHandle int32) int32

func Uint32Ptr

func Uint32Ptr(a uint32) *uint32

func WaitKey

func WaitKey() int32

func WaitTimer

func WaitTimer(waitTime int32) int32

func WaitVSync

func WaitVSync(syncNum int32) int32

Types

type ChangeFontOption

type ChangeFontOption struct {
	CharSet *int32
}

type CreateFontToHandleOption

type CreateFontToHandleOption struct {
	FontName *string
	Size     *int32
	Thick    *int32
	FontType *int32
	CharSet  *int32
	EdgeSize *int32
	Italic   *int32
	Handle   *int32
}

type DrawBoxAAOption

type DrawBoxAAOption struct {
	LineThickness *float32
}

type DrawCircleAAOption

type DrawCircleAAOption struct {
	LineThickness *float32
}

type DrawCircleOption

type DrawCircleOption struct {
	LineThickness *int32
}

type DrawExtendStringOption

type DrawExtendStringOption struct {
	EdgeColor *uint32
}

type DrawExtendStringToHandleOption

type DrawExtendStringToHandleOption struct {
	EdgeColor    *uint32
	VerticalFlag *int32
}

type DrawLineAAOption

type DrawLineAAOption struct {
	Thickness *float32
}

type DrawLineOption

type DrawLineOption struct {
	Thickness *int32
}

type DrawOvalAAOption

type DrawOvalAAOption struct {
	LineThickness *float32
}

type DrawOvalOption

type DrawOvalOption struct {
	LineThickness *int32
}

type DrawRectGraphOption

type DrawRectGraphOption struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawRotaGraph2Option

type DrawRotaGraph2Option struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawRotaGraph3Option

type DrawRotaGraph3Option struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawRotaGraphFast2Option

type DrawRotaGraphFast2Option struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawRotaGraphFast3Option

type DrawRotaGraphFast3Option struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawRotaGraphFastOption

type DrawRotaGraphFastOption struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawRotaGraphOption

type DrawRotaGraphOption struct {
	ReverseXFlag *int32
	ReverseYFlag *int32
}

type DrawStringOption

type DrawStringOption struct {
	EdgeColor *uint32
}

type DrawStringToHandleOption

type DrawStringToHandleOption struct {
	EdgeColor    *int32
	VerticalFlag *int32
}

type DrawTriangleAAOption

type DrawTriangleAAOption struct {
	LineThickness *float32
}

type GetDrawScreenGraphOption

type GetDrawScreenGraphOption struct {
	UseClientFlag *int32
}

type GetDrawStringWidthOption

type GetDrawStringWidthOption struct {
	VericalFlag *int32
}

type GetDrawStringWidthToHandleOption

type GetDrawStringWidthToHandleOption struct {
	VerticalFlag *int32
}

type GetNowCountOption

type GetNowCountOption struct {
	UseRDTSCFlag *int32
}

type GetNowHiPerformanceCountOption

type GetNowHiPerformanceCountOption struct {
	UseRDTSCFlag *int32
}

type InitGraphOption

type InitGraphOption struct {
	LogOutFlag *int32
}

type LoadDivGraphOption

type LoadDivGraphOption struct {
	NotUse3DFlag *int32
}

type LoadFontDataToHandleOption

type LoadFontDataToHandleOption struct {
	EdgeSize *int32
}

type LoadGraphOption

type LoadGraphOption struct {
	NotUse3DFlag *int32
}

type LoadSoundMemOption

type LoadSoundMemOption struct {
	BufferNum   *int32
	UnionHandle *int32
}

type MakeGraphOption

type MakeGraphOption struct {
	NotUse3DFlag *int32
}

type RECT

type RECT struct {
	// contains filtered or unexported fields
}

type SetGraphModeOption

type SetGraphModeOption struct {
	ColorBitNum *int32
	RefreshRate *int32
}

type VECTOR

type VECTOR struct {
	X, Y, Z float64
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL