Skip to content

Commit 60ac9c0

Browse files
committed
Experimental support for Cubism
1 parent 53d2e4c commit 60ac9c0

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

DxLive2DCubism4.h

+37-33
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -------------------------------------------------------------------------------
22
//
3-
// DXライブラリ Live2D Cubism4 関係プログラムヘッダファイル
3+
// �c�w���C�u���� Live2D Cubism4 �֌W�v���O�����w�b�_�t�@�C��
44
//
55
// Ver 3.21f
66
//
@@ -9,7 +9,7 @@
99
#ifndef DXLIVE2D_CUBISM4_H
1010
#define DXLIVE2D_CUBISM4_H
1111

12-
// インクルード ------------------------------------------------------------------
12+
// �C���N���[�h ------------------------------------------------------------------
1313
#include "DxCompileConfig.h"
1414

1515
#ifndef DX_NON_LIVE2D_CUBISM4
@@ -36,6 +36,10 @@
3636
#endif // TARGET_OS_IPHONE
3737
#endif // __APPLE__
3838

39+
#ifdef __EMSCRIPTEN__
40+
#include "HTML5/DxLive2DCubism4HTML5.h"
41+
#endif
42+
3943

4044

4145

@@ -47,7 +51,7 @@ namespace DxLib
4751

4852
#endif// DX_NON_NAMESPACE
4953

50-
// マクロ定義 --------------------------------------------------------------------
54+
// �}�N����` --------------------------------------------------------------------
5155

5256
#define LIVE2DSYS Live2DCubism4SysData
5357
#define LIVE2DDLL Live2DCubism4DLLData
@@ -128,18 +132,18 @@ namespace DxLib
128132
#define CALL_csmResetDrawableDynamicFlags( x ) ( Live2DCubism4DLLData.csmResetDrawableDynamicFlags x )
129133
#endif // WINDOWS_DESKTOP_OS
130134

131-
// 構造体定義 --------------------------------------------------------------------
135+
// �\���̒�` --------------------------------------------------------------------
132136

133-
// ファイルからLive2Dモデルハンドルを作成する処理に必要なグローバルデータを纏めたもの
137+
// �t�@�C������Live2D���f���n���h�����쐬���鏈���ɕK�v�ȃO���[�o���f�[�^��Z�߂�����
134138
struct LIVE2DCUBISM4_LOADMODEL_GPARAM
135139
{
136140
int Dummy ;
137141
} ;
138142

139-
// Live2D Cubism4 モデル情報
143+
// Live2D Cubism4 ���f�����
140144
struct LIVE2DCUBISM4MODEL
141145
{
142-
HANDLEINFO HandleInfo ; // ハンドル共通データ
146+
HANDLEINFO HandleInfo ; // �n���h�����ʃf�[�^
143147

144148
float PosX ;
145149
float PosY ;
@@ -150,10 +154,10 @@ struct LIVE2DCUBISM4MODEL
150154
D_LAppModel * AppModel ;
151155
} ;
152156

153-
// Live2D Cubism4 DLL の関数ポインタ構造体
157+
// Live2D Cubism4 DLL �̊֐��|�C���^�\����
154158
struct LIVE2DCUBISM4DLL
155159
{
156-
wchar_t Live2DCubismCoreDLLPath[ 1024 ] ; // Live2D Cubism Core DLL のファイルパス
160+
wchar_t Live2DCubismCoreDLLPath[ 1024 ] ; // Live2D Cubism Core DLL �̃t�@�C���p�X
157161

158162
DWORD ( *csmGetVersion )( void ) ;
159163
DWORD ( *csmGetLatestMocVersion )( void ) ;
@@ -232,49 +236,49 @@ struct LIVE2DCUBISM4DLL
232236
#endif // WINDOWS_DESKTOP_OS
233237
} ;
234238

235-
// Live2D Cubism4 システム用データ構造体
239+
// Live2D Cubism4 �V�X�e���p�f�[�^�\����
236240
struct LIVE2DCUBISM4SYSTEMDATA
237241
{
238-
int InitializeFlag ; // 初期化フラグ
242+
int InitializeFlag ; // �������t���O
239243

240-
int EnableConstantBuffer ; // コンスタントバッファが使用できるかどうか
244+
int EnableConstantBuffer ; // �R���X�^���g�o�b�t�@���g�p�ł��邩�ǂ���
241245

242246
D_CubismIdManager * s_cubismIdManager ;
243247

244-
DXARC ShaderBinDxa ; // シェーダーオブジェクトファイルDXA構造体
245-
void *ShaderBinDxaImage ; // シェーダーオブジェクトファイルDXAのバイナリイメージ
248+
DXARC ShaderBinDxa ; // �V�F�[�_�[�I�u�W�F�N�g�t�@�C���c�w�`�\����
249+
void *ShaderBinDxaImage ; // �V�F�[�_�[�I�u�W�F�N�g�t�@�C���c�w�`�̃o�C�i���C���[�W
246250

247-
LIVE2DCUBISM4SYSTEMDATA_PF PF ; // 環境依存データ
251+
LIVE2DCUBISM4SYSTEMDATA_PF PF ; // �‹��ˑ��f�[�^
248252
} ;
249253

250-
// テーブル-----------------------------------------------------------------------
254+
// �e�[�u��-----------------------------------------------------------------------
251255

252-
// 内部大域変数宣言 --------------------------------------------------------------
256+
// �������ϐ��錾 --------------------------------------------------------------
253257

254-
// Live2D Cubism4 システムデータ
258+
// Live2D Cubism4 �V�X�e���f�[�^
255259
extern LIVE2DCUBISM4SYSTEMDATA Live2DCubism4SysData ;
256260

257261
// Live2D Cubism 4 DLL
258262
extern LIVE2DCUBISM4DLL Live2DCubism4DLLData ;
259263

260-
// 関数プロトタイプ宣言-----------------------------------------------------------
264+
// �֐��v���g�^�C�v�錾-----------------------------------------------------------
261265

262-
// Live2D Cubism4 関連の初期化と後始末
263-
extern int Live2DCubism4_Initialize( void ) ; // Live2D Cubism4 の初期化
264-
extern int Live2DCubism4_Terminate( void ) ; // Live2D Cubism4 の後始末
266+
// Live2D Cubism4 �֘A�̏������ƌ�n��
267+
extern int Live2DCubism4_Initialize( void ) ; // Live2D Cubism4 �̏�����
268+
extern int Live2DCubism4_Terminate( void ) ; // Live2D Cubism4 �̌�n��
265269

266270

267-
extern int Live2DCubism4_SetupShaderCode( int *ShaderCodeBinConvert, BYTE *ShaderCodeBin ) ; // シェーダーDXAファイルのセットアップ
268-
extern int Live2DCubism4_LoadShaderCode( const char *ShaderName, int ShaderType ) ; // 指定名のシェーダーを読み込む
271+
extern int Live2DCubism4_SetupShaderCode( int *ShaderCodeBinConvert, BYTE *ShaderCodeBin ) ; // �V�F�[�_�[DXA�t�@�C���̃Z�b�g�A�b�v
272+
extern int Live2DCubism4_LoadShaderCode( const char *ShaderName, int ShaderType ) ; // �w�薼�̃V�F�[�_�[��ǂݍ���
269273

270-
extern void Live2DCubism4_InitLoadModelGParam( LIVE2DCUBISM4_LOADMODEL_GPARAM *GParam ) ; // LIVE2DCUBISM4_LOADMODEL_GPARAM のデータをセットする
274+
extern void Live2DCubism4_InitLoadModelGParam( LIVE2DCUBISM4_LOADMODEL_GPARAM *GParam ) ; // LIVE2DCUBISM4_LOADMODEL_GPARAM �̃f�[�^���Z�b�g����
271275

272-
extern int Live2DCubism4_LoadModel_UseGParam( LIVE2DCUBISM4_LOADMODEL_GPARAM *GParam, const wchar_t *FilePath, int ASyncLoadFlag = FALSE, int ASyncThread = FALSE ) ; // Live2D_LoadModel のグローバル変数にアクセスしないバージョン
276+
extern int Live2DCubism4_LoadModel_UseGParam( LIVE2DCUBISM4_LOADMODEL_GPARAM *GParam, const wchar_t *FilePath, int ASyncLoadFlag = FALSE, int ASyncThread = FALSE ) ; // Live2D_LoadModel �̃O���[�o���ϐ��ɃA�N�Z�X���Ȃ��o�[�W����
273277

274278

275279

276280

277-
// wchar_t版関数
281+
// wchar_t�Ŋ֐�
278282
extern int Live2D_SetCubism4CoreDLLPath_WCHAR_T( const wchar_t *CoreDLLFilePath ) ;
279283
extern int Live2D_LoadModel_WCHAR_T( const wchar_t *FilePath ) ;
280284
extern int Live2D_Model_StartMotion_WCHAR_T( int Live2DModelHandle, const wchar_t *group, int no ) ;
@@ -298,13 +302,13 @@ extern float Live2D_Model_GetMotionFadeOutTimeValue_WCHAR_T( int Live2DModelHan
298302

299303

300304

301-
// 環境依存関数
302-
extern int Live2DCubism4_Initialize_PF( void ) ; // Live2D Cubism4 関連の初期化する関数の環境依存処理を行う関数
303-
extern int Live2DCubism4_Terminate_PF( void ) ; // Live2D Cubism4 関連の後始末をする関数の環境依存処理を行う関数
305+
// �‹��ˑ��֐�
306+
extern int Live2DCubism4_Initialize_PF( void ) ; // Live2D Cubism4 �֘A�̏���������֐��̊‹��ˑ��������s���֐�
307+
extern int Live2DCubism4_Terminate_PF( void ) ; // Live2D Cubism4 �֘A�̌�n��������֐��̊‹��ˑ��������s���֐�
304308

305-
extern int Live2DCubism4_GenerateShaders_PF( void ) ; // Live2D Cubism4 のシェーダー作成の環境依存処理を行う
306-
extern int Live2DCubism4_SetupShader_PF( int ConstantBufferHandle, D_CubismConstantBufferDxLib *ConstantBuffer, D_ShaderNames VertexShader, D_ShaderNames PixelShader ) ; // Live2D Cubism4 のシェーダーのセットアップを行う
307-
extern int Live2DCubism4_DrawAfter_PF( void ) ; // Live2D Cubism4 の描画の後に呼ばれる環境依存関数
309+
extern int Live2DCubism4_GenerateShaders_PF( void ) ; // Live2D Cubism4 �̃V�F�[�_�[�쐬�̊‹��ˑ��������s��
310+
extern int Live2DCubism4_SetupShader_PF( int ConstantBufferHandle, D_CubismConstantBufferDxLib *ConstantBuffer, D_ShaderNames VertexShader, D_ShaderNames PixelShader ) ; // Live2D Cubism4 �̃V�F�[�_�[�̃Z�b�g�A�b�v���s��
311+
extern int Live2DCubism4_DrawAfter_PF( void ) ; // Live2D Cubism4 �̕`��̌�ɌĂ΂��‹��ˑ��֐�
308312

309313

310314

0 commit comments

Comments
 (0)