diff options
Diffstat (limited to 'libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.h')
-rw-r--r-- | libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.h | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.h b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.h index 5a35938..ee0eefb 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.h +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.h | |||
@@ -1,78 +1,78 @@ | |||
1 | #ifndef __IRR_FONT_TOOL_INCLUDED__ | 1 | #ifndef __IRR_FONT_TOOL_INCLUDED__ |
2 | #define __IRR_FONT_TOOL_INCLUDED__ | 2 | #define __IRR_FONT_TOOL_INCLUDED__ |
3 | 3 | ||
4 | 4 | ||
5 | #include "irrlicht.h" | 5 | #include "irrlicht.h" |
6 | 6 | ||
7 | #if defined(_IRR_WINDOWS_) | 7 | #if defined(_IRR_WINDOWS_) |
8 | #ifdef _MBCS | 8 | #ifdef _MBCS |
9 | #undef _MBCS | 9 | #undef _MBCS |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #define UNICODE | 12 | #define UNICODE |
13 | #define _WIN32_WINNT 0x0500 | 13 | #define _WIN32_WINNT 0x0500 |
14 | #include "windows.h" | 14 | #include "windows.h" |
15 | #else | 15 | #else |
16 | #ifdef _IRR_COMPILE_WITH_X11_ | 16 | #ifdef _IRR_COMPILE_WITH_X11_ |
17 | #include <X11/Xlib.h> | 17 | #include <X11/Xlib.h> |
18 | #endif | 18 | #endif |
19 | #include <X11/Xft/Xft.h> | 19 | #include <X11/Xft/Xft.h> |
20 | #include <set> | 20 | #include <set> |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | 23 | ||
24 | namespace irr { | 24 | namespace irr { |
25 | class CFontTool : public irr::IReferenceCounted | 25 | class CFontTool : public irr::IReferenceCounted |
26 | { | 26 | { |
27 | public: | 27 | public: |
28 | CFontTool(irr::IrrlichtDevice* device); | 28 | CFontTool(irr::IrrlichtDevice* device); |
29 | ~CFontTool(); | 29 | ~CFontTool(); |
30 | 30 | ||
31 | virtual bool makeBitmapFont(u32 fontIndex, u32 charsetIndex, | 31 | virtual bool makeBitmapFont(u32 fontIndex, u32 charsetIndex, |
32 | s32 fontSize, u32 texturewidth, u32 textureHeight, | 32 | s32 fontSize, u32 texturewidth, u32 textureHeight, |
33 | bool bold, bool italic, bool aa, bool alpha); | 33 | bool bold, bool italic, bool aa, bool alpha); |
34 | 34 | ||
35 | virtual bool saveBitmapFont(const c8* filename, const c8* format); | 35 | virtual bool saveBitmapFont(const c8* filename, const c8* format); |
36 | 36 | ||
37 | virtual void selectCharSet(u32 currentCharSet); | 37 | virtual void selectCharSet(u32 currentCharSet); |
38 | 38 | ||
39 | struct SFontArea | 39 | struct SFontArea |
40 | { | 40 | { |
41 | SFontArea() : rectangle(), underhang(0), overhang(0), sourceimage(0) {} | 41 | SFontArea() : rectangle(), underhang(0), overhang(0), sourceimage(0) {} |
42 | core::rect<s32> rectangle; | 42 | core::rect<s32> rectangle; |
43 | s32 underhang; | 43 | s32 underhang; |
44 | s32 overhang; | 44 | s32 overhang; |
45 | u32 sourceimage; | 45 | u32 sourceimage; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* struct SFontMap | 48 | /* struct SFontMap |
49 | { | 49 | { |
50 | SFontMap() : areas(), start(0), count(0) {} | 50 | SFontMap() : areas(), start(0), count(0) {} |
51 | core::array< SFontArea > areas; | 51 | core::array< SFontArea > areas; |
52 | s32 start; | 52 | s32 start; |
53 | s32 count; | 53 | s32 count; |
54 | };*/ | 54 | };*/ |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | core::array<core::stringw> FontNames; | 58 | core::array<core::stringw> FontNames; |
59 | core::array<core::stringw> CharSets; | 59 | core::array<core::stringw> CharSets; |
60 | //core::array<SFontMap> Mappings; | 60 | //core::array<SFontMap> Mappings; |
61 | core::array<SFontArea> Areas; | 61 | core::array<SFontArea> Areas; |
62 | core::map<wchar_t, u32> CharMap; | 62 | core::map<wchar_t, u32> CharMap; |
63 | 63 | ||
64 | core::array<video::ITexture*> currentTextures; | 64 | core::array<video::ITexture*> currentTextures; |
65 | core::array<video::IImage*> currentImages; | 65 | core::array<video::IImage*> currentImages; |
66 | const int *FontSizes; | 66 | const int *FontSizes; |
67 | IrrlichtDevice *Device; | 67 | IrrlichtDevice *Device; |
68 | 68 | ||
69 | bool UseAlphaChannel; | 69 | bool UseAlphaChannel; |
70 | 70 | ||
71 | // windows | 71 | // windows |
72 | #ifdef _IRR_WINDOWS_ | 72 | #ifdef _IRR_WINDOWS_ |
73 | HDC dc; | 73 | HDC dc; |
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | }; | 76 | }; |
77 | } | 77 | } |
78 | #endif // __IRR_FONT_TOOL_INCLUDED__ | 78 | #endif // __IRR_FONT_TOOL_INCLUDED__ |