-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathKF_UtilityDX.h
More file actions
64 lines (59 loc) · 2.23 KB
/
KF_UtilityDX.h
File metadata and controls
64 lines (59 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//--------------------------------------------------------------------------------
// DX用便利関数
// KF_UtilityDX.h
// Author : Xu Wenjie
// Date : 2016-07-24
//--------------------------------------------------------------------------------
#pragma once
//--------------------------------------------------------------------------------
// インクルードファイル
//--------------------------------------------------------------------------------
#include "main.h"
#ifdef USING_DIRECTX
//--------------------------------------------------------------------------------
// 構造体定義
//--------------------------------------------------------------------------------
//struct SPRITE2D
//{
// unsigned short usNumPolygon;
// string strTexName;
// LPDIRECT3DVERTEXBUFFER9 pVtxBuffer;
//};
//--------------------------------------------------------------------------------
// クラス定義
//--------------------------------------------------------------------------------
//class CSprite2D
//{
//public:
// CSprite2D()
// : m_usNumPolygon(0), m_strTexName("polygon.jpg"), m_pVtxBuffer(nullptr) {}
// ~CSprite2D()
// {
// m_strTexName.clear();
// }
//
// unsigned short m_usNumPolygon;
// string m_strTexName;
// LPDIRECT3DVERTEXBUFFER9 m_pVtxBuffer;
//};
class CKFUtilityDX
{
public:
CKFUtilityDX() {}
~CKFUtilityDX() {}
static bool MakeVertex(LPDIRECT3DVERTEXBUFFER9& pVtxBuffer,
const CKFVec2& vPosCenter, const CKFVec2& vSize,
const CKFVec2& vUVBegin = CKFVec2(0.0f), const CKFVec2& vUVSize = CKFVec2(1.0f),
const float& fRot = 0.0f, const CKFColor& cColor = CKFColor(1.0f));
static bool MakeVertexGauge(LPDIRECT3DVERTEXBUFFER9& pVtxBuffer,
const CKFVec2& vPosLeftTop, const CKFVec2& vSize,
const CKFColor& cColor = CKFColor(1.0f),
const CKFVec2& vUVBegin = CKFVec2(0.0f), const CKFVec2& vUVSize = CKFVec2(1.0f));
static void UpdateVertexGauge(LPDIRECT3DVERTEXBUFFER9& pVtxBuffer,
const CKFVec2& vPosLeftTop, const CKFVec2& vSize,
const float& fRate, const CKFColor& cColor = CKFColor(1.0f),
const CKFVec2& vUVBegin = CKFVec2(0.0f), const CKFVec2& vUVSize = CKFVec2(1.0f));
static void UpdateUV(LPDIRECT3DVERTEXBUFFER9& pVtxBuffer, const CKFVec2& vUVBegin, const CKFVec2& vUVSize);
//static void DrawSprite(const SPRITE2D& sprite);
};
#endif