diff options
Diffstat (limited to 'libraries/irrlicht-1.8/tools')
54 files changed, 9602 insertions, 9602 deletions
diff --git a/libraries/irrlicht-1.8/tools/FileToHeader/Makefile b/libraries/irrlicht-1.8/tools/FileToHeader/Makefile index e9cd818..391a394 100644 --- a/libraries/irrlicht-1.8/tools/FileToHeader/Makefile +++ b/libraries/irrlicht-1.8/tools/FileToHeader/Makefile | |||
@@ -1,35 +1,35 @@ | |||
1 | # Makefile for FileToHeader | 1 | # Makefile for FileToHeader |
2 | Target = FileToHeader | 2 | Target = FileToHeader |
3 | Sources = main.cpp | 3 | Sources = main.cpp |
4 | 4 | ||
5 | # general compiler settings | 5 | # general compiler settings |
6 | CPPFLAGS = -I../../include | 6 | CPPFLAGS = -I../../include |
7 | CXXFLAGS = -O3 -ffast-math -Wall | 7 | CXXFLAGS = -O3 -ffast-math -Wall |
8 | #CXXFLAGS = -g -Wall | 8 | #CXXFLAGS = -g -Wall |
9 | 9 | ||
10 | #default target is Linux | 10 | #default target is Linux |
11 | all: all_linux | 11 | all: all_linux |
12 | 12 | ||
13 | ifeq ($(HOSTTYPE), x86_64) | 13 | ifeq ($(HOSTTYPE), x86_64) |
14 | LIBSELECT=64 | 14 | LIBSELECT=64 |
15 | endif | 15 | endif |
16 | 16 | ||
17 | # target specific settings | 17 | # target specific settings |
18 | all_linux clean_linux: SYSTEM=Linux | 18 | all_linux clean_linux: SYSTEM=Linux |
19 | all_win32: LDFLAGS = -L../../lib/Win32-gcc | 19 | all_win32: LDFLAGS = -L../../lib/Win32-gcc |
20 | all_win32 clean_win32: SYSTEM=Win32-gcc | 20 | all_win32 clean_win32: SYSTEM=Win32-gcc |
21 | all_win32 clean_win32: SUF=.exe | 21 | all_win32 clean_win32: SUF=.exe |
22 | # name of the binary - only valid for targets which set SYSTEM | 22 | # name of the binary - only valid for targets which set SYSTEM |
23 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) | 23 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) |
24 | 24 | ||
25 | all_linux all_win32: | 25 | all_linux all_win32: |
26 | $(warning Building...) | 26 | $(warning Building...) |
27 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) | 27 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) |
28 | 28 | ||
29 | clean: clean_linux clean_win32 | 29 | clean: clean_linux clean_win32 |
30 | $(warning Cleaning...) | 30 | $(warning Cleaning...) |
31 | 31 | ||
32 | clean_linux clean_win32: | 32 | clean_linux clean_win32: |
33 | @$(RM) $(DESTPATH) | 33 | @$(RM) $(DESTPATH) |
34 | 34 | ||
35 | .PHONY: all all_win32 clean clean_linux clean_win32 | 35 | .PHONY: all all_win32 clean clean_linux clean_win32 |
diff --git a/libraries/irrlicht-1.8/tools/FileToHeader/main.cpp b/libraries/irrlicht-1.8/tools/FileToHeader/main.cpp index b3cc7a7..492f19b 100644 --- a/libraries/irrlicht-1.8/tools/FileToHeader/main.cpp +++ b/libraries/irrlicht-1.8/tools/FileToHeader/main.cpp | |||
@@ -1,175 +1,175 @@ | |||
1 | // Copyright (C) 2012 Gaz Davidson | 1 | // Copyright (C) 2012 Gaz Davidson |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | /*** | 5 | /*** |
6 | This tool creates a .h file from a given input file by encoding it into a C string, | 6 | This tool creates a .h file from a given input file by encoding it into a C string, |
7 | allowing you to build your resources directly into your binaries, just like Irrlicht's | 7 | allowing you to build your resources directly into your binaries, just like Irrlicht's |
8 | built-in font. | 8 | built-in font. |
9 | 9 | ||
10 | To distribute your app as a single executable file of minimal size: | 10 | To distribute your app as a single executable file of minimal size: |
11 | 11 | ||
12 | 1. Put all your resources into a single directory and add it to Irrlicht's filesystem | 12 | 1. Put all your resources into a single directory and add it to Irrlicht's filesystem |
13 | as a folder through IFileSystem::addArchive. Develop and test your app as usual. | 13 | as a folder through IFileSystem::addArchive. Develop and test your app as usual. |
14 | 2. Open IrrCompileConfig.h and comment out all the options that your app does not use. | 14 | 2. Open IrrCompileConfig.h and comment out all the options that your app does not use. |
15 | This will reduce the size of the Irrlicht library considerably. | 15 | This will reduce the size of the Irrlicht library considerably. |
16 | * You should remove the D3D video drivers, because they rely on external DLLs. | 16 | * You should remove the D3D video drivers, because they rely on external DLLs. |
17 | * You should keep either the TAR or ZIP archive loader, used in step 6. | 17 | * You should keep either the TAR or ZIP archive loader, used in step 6. |
18 | * If you remove the JPEG loader, you don't have to say you use JPEG code in your | 18 | * If you remove the JPEG loader, you don't have to say you use JPEG code in your |
19 | documentation. | 19 | documentation. |
20 | 3. Recompile Irrlicht as a static library, editing the IRR_STATIC_LIB line in | 20 | 3. Recompile Irrlicht as a static library, editing the IRR_STATIC_LIB line in |
21 | IrrCompileConfig.h. | 21 | IrrCompileConfig.h. |
22 | The next time you compile your application it will take a while longer, but | 22 | The next time you compile your application it will take a while longer, but |
23 | Irrlicht will be built into your binary. | 23 | Irrlicht will be built into your binary. |
24 | 4. TAR or ZIP your resource directory using your favourite archiving tool (ie 7zip). | 24 | 4. TAR or ZIP your resource directory using your favourite archiving tool (ie 7zip). |
25 | * If you chose ZIP but compiled without zlib, don't compress this archive or it | 25 | * If you chose ZIP but compiled without zlib, don't compress this archive or it |
26 | won't open. | 26 | won't open. |
27 | 5. Run this tool to convert your resource file into a .h file, like so: | 27 | 5. Run this tool to convert your resource file into a .h file, like so: |
28 | FileToHeader res.zip > EmbeddedResources.h | 28 | FileToHeader res.zip > EmbeddedResources.h |
29 | 6. Add the .h file to your project, create the embedded read file then mount as a | 29 | 6. Add the .h file to your project, create the embedded read file then mount as a |
30 | ZIP or TAR archive instead of the folder, like so: | 30 | ZIP or TAR archive instead of the folder, like so: |
31 | io::IReadFile *f = io::createEmbeddedFile(device->getFileSystem(), "res.zip"); | 31 | io::IReadFile *f = io::createEmbeddedFile(device->getFileSystem(), "res.zip"); |
32 | device->getFileSystem()->addFileArchive(f); | 32 | device->getFileSystem()->addFileArchive(f); |
33 | archive->drop(); | 33 | archive->drop(); |
34 | 7. Recompile your app. | 34 | 7. Recompile your app. |
35 | * If you use Microsoft's compiler, make sure your CRT (common run-time) is | 35 | * If you use Microsoft's compiler, make sure your CRT (common run-time) is |
36 | the static library version, otherwise you'll have a dependency on the CRT DLLs. | 36 | the static library version, otherwise you'll have a dependency on the CRT DLLs. |
37 | Your binary should now be completely portable; you can distribute just the exe file. | 37 | Your binary should now be completely portable; you can distribute just the exe file. |
38 | 8. Optional: Use UPX (upx.sf.net) to compress your binary. | 38 | 8. Optional: Use UPX (upx.sf.net) to compress your binary. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <iostream> | 41 | #include <iostream> |
42 | #include <fstream> | 42 | #include <fstream> |
43 | #include <sstream> | 43 | #include <sstream> |
44 | 44 | ||
45 | using namespace std; | 45 | using namespace std; |
46 | 46 | ||
47 | int main(int argc, char* argv[]) | 47 | int main(int argc, char* argv[]) |
48 | { | 48 | { |
49 | if (argc < 2) | 49 | if (argc < 2) |
50 | { | 50 | { |
51 | // print usage | 51 | // print usage |
52 | cerr << "You must to specify at least one input file" << endl; | 52 | cerr << "You must to specify at least one input file" << endl; |
53 | cerr << "usage: " << argv[0] << "<file1> [file2...]" << endl; | 53 | cerr << "usage: " << argv[0] << "<file1> [file2...]" << endl; |
54 | cerr << "outputs a header file to stdout, so for example use"; | 54 | cerr << "outputs a header file to stdout, so for example use"; |
55 | return 1; | 55 | return 1; |
56 | } | 56 | } |
57 | 57 | ||
58 | int i = 1; | 58 | int i = 1; |
59 | 59 | ||
60 | // write file header | 60 | // write file header |
61 | cout << "// File made by FileToHeader, part of the Irrlicht Engine" << endl | 61 | cout << "// File made by FileToHeader, part of the Irrlicht Engine" << endl |
62 | << endl | 62 | << endl |
63 | << "#ifndef _EMBEDDED_FILES_H_INCLUDED_" << endl | 63 | << "#ifndef _EMBEDDED_FILES_H_INCLUDED_" << endl |
64 | << "#define _EMBEDDED_FILES_H_INCLUDED_" << endl | 64 | << "#define _EMBEDDED_FILES_H_INCLUDED_" << endl |
65 | << endl | 65 | << endl |
66 | << "#include \"irrTypes.h\"" << endl | 66 | << "#include \"irrTypes.h\"" << endl |
67 | << "#include \"IReadFile.h\"" << endl | 67 | << "#include \"IReadFile.h\"" << endl |
68 | << "#include \"IFileSystem.h\"" << endl | 68 | << "#include \"IFileSystem.h\"" << endl |
69 | << endl | 69 | << endl |
70 | << "namespace irr" << endl | 70 | << "namespace irr" << endl |
71 | << "{" << endl | 71 | << "{" << endl |
72 | << "namespace io" << endl | 72 | << "namespace io" << endl |
73 | << "{" << endl | 73 | << "{" << endl |
74 | << endl | 74 | << endl |
75 | << " const c8* EmbeddedFileData[] = " << endl | 75 | << " const c8* EmbeddedFileData[] = " << endl |
76 | << " {" << endl; | 76 | << " {" << endl; |
77 | 77 | ||
78 | // store sizes and file names | 78 | // store sizes and file names |
79 | stringstream sizes; | 79 | stringstream sizes; |
80 | stringstream names; | 80 | stringstream names; |
81 | sizes << "const u32 EmbeddedFileSizes[] = {"; | 81 | sizes << "const u32 EmbeddedFileSizes[] = {"; |
82 | names << "const c8* EmbeddedFileNames[] = {"; | 82 | names << "const c8* EmbeddedFileNames[] = {"; |
83 | int fileCount = 0; | 83 | int fileCount = 0; |
84 | 84 | ||
85 | // char to hex digit table, probably doesn't help for speed due to fstream. better than using sprintf though | 85 | // char to hex digit table, probably doesn't help for speed due to fstream. better than using sprintf though |
86 | char hextable[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; | 86 | char hextable[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; |
87 | 87 | ||
88 | while (i < argc) | 88 | while (i < argc) |
89 | { | 89 | { |
90 | // open and seek to end of file | 90 | // open and seek to end of file |
91 | ifstream input; | 91 | ifstream input; |
92 | input.open(argv[i], ios::in | ios::binary | ios::ate); | 92 | input.open(argv[i], ios::in | ios::binary | ios::ate); |
93 | 93 | ||
94 | if (input.is_open()) | 94 | if (input.is_open()) |
95 | { | 95 | { |
96 | int size = input.tellg(); | 96 | int size = input.tellg(); |
97 | input.seekg(0, ios::beg); | 97 | input.seekg(0, ios::beg); |
98 | // read the file into RAM | 98 | // read the file into RAM |
99 | char *entireFile = new char[size]; | 99 | char *entireFile = new char[size]; |
100 | input.read(entireFile, size); | 100 | input.read(entireFile, size); |
101 | 101 | ||
102 | if (fileCount) | 102 | if (fileCount) |
103 | { | 103 | { |
104 | sizes << ", "; | 104 | sizes << ", "; |
105 | names << ", "; | 105 | names << ", "; |
106 | cout << "," << endl; | 106 | cout << "," << endl; |
107 | } | 107 | } |
108 | 108 | ||
109 | // save file size and name | 109 | // save file size and name |
110 | sizes << size; | 110 | sizes << size; |
111 | names << '"' << argv[i] << '"'; | 111 | names << '"' << argv[i] << '"'; |
112 | 112 | ||
113 | // write the file data | 113 | // write the file data |
114 | cout << " \""; | 114 | cout << " \""; |
115 | for (int count=0; count < size; ++count) | 115 | for (int count=0; count < size; ++count) |
116 | { | 116 | { |
117 | if (count && (count % 16) == 0) | 117 | if (count && (count % 16) == 0) |
118 | cout << "\"" << endl << " \""; | 118 | cout << "\"" << endl << " \""; |
119 | 119 | ||
120 | cout << "\\x" << hextable[(entireFile[count] >> 4) & 0xF] << hextable[entireFile[count] & 0x0F]; | 120 | cout << "\\x" << hextable[(entireFile[count] >> 4) & 0xF] << hextable[entireFile[count] & 0x0F]; |
121 | } | 121 | } |
122 | cout << "\""; | 122 | cout << "\""; |
123 | 123 | ||
124 | delete [] entireFile; | 124 | delete [] entireFile; |
125 | // | 125 | // |
126 | input.close(); | 126 | input.close(); |
127 | 127 | ||
128 | fileCount++; | 128 | fileCount++; |
129 | } | 129 | } |
130 | else | 130 | else |
131 | { | 131 | { |
132 | cerr << "Failed to open file: " << argv[i] << endl; | 132 | cerr << "Failed to open file: " << argv[i] << endl; |
133 | } | 133 | } |
134 | 134 | ||
135 | ++i; | 135 | ++i; |
136 | } | 136 | } |
137 | 137 | ||
138 | // close binary file list and write file metadata | 138 | // close binary file list and write file metadata |
139 | cout << endl | 139 | cout << endl |
140 | << " , 0};" << endl | 140 | << " , 0};" << endl |
141 | << endl | 141 | << endl |
142 | << " const u32 EmbeddedFileCount = " << fileCount << ";" << endl | 142 | << " const u32 EmbeddedFileCount = " << fileCount << ";" << endl |
143 | << " " << sizes.str() << "};" << endl | 143 | << " " << sizes.str() << "};" << endl |
144 | << " " << names.str() << "};" << endl | 144 | << " " << names.str() << "};" << endl |
145 | << endl; | 145 | << endl; |
146 | 146 | ||
147 | // write functions to create embedded IReadFiles | 147 | // write functions to create embedded IReadFiles |
148 | cout << " IReadFile* createEmbeddedFile(IFileSystem *fs, u32 index)" << endl | 148 | cout << " IReadFile* createEmbeddedFile(IFileSystem *fs, u32 index)" << endl |
149 | << " {" << endl | 149 | << " {" << endl |
150 | << " if (EmbeddedFileCount < index)" << endl | 150 | << " if (EmbeddedFileCount < index)" << endl |
151 | << " return 0;" << endl | 151 | << " return 0;" << endl |
152 | << endl | 152 | << endl |
153 | << " return fs->createMemoryReadFile((void*)EmbeddedFileData[index], " << endl | 153 | << " return fs->createMemoryReadFile((void*)EmbeddedFileData[index], " << endl |
154 | << " EmbeddedFileSizes[index], EmbeddedFileNames[index]);" << endl | 154 | << " EmbeddedFileSizes[index], EmbeddedFileNames[index]);" << endl |
155 | << " }" << endl | 155 | << " }" << endl |
156 | << endl | 156 | << endl |
157 | << " IReadFile* createEmbeddedFile(IFileSystem *fs, path filename)" << endl | 157 | << " IReadFile* createEmbeddedFile(IFileSystem *fs, path filename)" << endl |
158 | << " {" << endl | 158 | << " {" << endl |
159 | << " for (u32 i=0; i < EmbeddedFileCount; ++i)" << endl | 159 | << " for (u32 i=0; i < EmbeddedFileCount; ++i)" << endl |
160 | << " if (filename == EmbeddedFileNames[i])" << endl | 160 | << " if (filename == EmbeddedFileNames[i])" << endl |
161 | << " return createEmbeddedFile(fs, i);" << endl | 161 | << " return createEmbeddedFile(fs, i);" << endl |
162 | << endl | 162 | << endl |
163 | << " return 0;" << endl | 163 | << " return 0;" << endl |
164 | << " }" << endl | 164 | << " }" << endl |
165 | << endl; | 165 | << endl; |
166 | 166 | ||
167 | // write footer | 167 | // write footer |
168 | cout << "} // namespace io" << endl | 168 | cout << "} // namespace io" << endl |
169 | << "} // namespace irr" << endl | 169 | << "} // namespace irr" << endl |
170 | << endl | 170 | << endl |
171 | << "#endif // _EMBEDDED_FILES_H_INCLUDED_" << endl; | 171 | << "#endif // _EMBEDDED_FILES_H_INCLUDED_" << endl; |
172 | 172 | ||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h index 0585498..1f2b092 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttribute.h | |||
@@ -1,169 +1,169 @@ | |||
1 | /* | 1 | /* |
2 | This base class is used by the Attribute editor for making your own attribute types. | 2 | This base class is used by the Attribute editor for making your own attribute types. |
3 | 3 | ||
4 | The attribute editor will try and create an attribute called "AttribType_attribute", | 4 | The attribute editor will try and create an attribute called "AttribType_attribute", |
5 | and if it fails, it will create a "string_attribute". | 5 | and if it fails, it will create a "string_attribute". |
6 | 6 | ||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __C_GUI_ATTRIBUTE_H_INCLUDED__ | 9 | #ifndef __C_GUI_ATTRIBUTE_H_INCLUDED__ |
10 | #define __C_GUI_ATTRIBUTE_H_INCLUDED__ | 10 | #define __C_GUI_ATTRIBUTE_H_INCLUDED__ |
11 | 11 | ||
12 | #include "IGUIElement.h" | 12 | #include "IGUIElement.h" |
13 | #include "IGUIEnvironment.h" | 13 | #include "IGUIEnvironment.h" |
14 | #include "IGUIFont.h" | 14 | #include "IGUIFont.h" |
15 | #include "IGUIStaticText.h" | 15 | #include "IGUIStaticText.h" |
16 | #include "IAttributes.h" | 16 | #include "IAttributes.h" |
17 | #include "CGUIEditWorkspace.h" | 17 | #include "CGUIEditWorkspace.h" |
18 | 18 | ||
19 | namespace irr | 19 | namespace irr |
20 | { | 20 | { |
21 | 21 | ||
22 | namespace gui | 22 | namespace gui |
23 | { | 23 | { |
24 | 24 | ||
25 | const u32 ATTRIBEDIT_ATTRIB_CHANGED=MAKE_IRR_ID('A','T','T','R'); | 25 | const u32 ATTRIBEDIT_ATTRIB_CHANGED=MAKE_IRR_ID('A','T','T','R'); |
26 | 26 | ||
27 | class CGUIAttribute : public IGUIElement | 27 | class CGUIAttribute : public IGUIElement |
28 | { | 28 | { |
29 | public: | 29 | public: |
30 | //! constructor | 30 | //! constructor |
31 | CGUIAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : | 31 | CGUIAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : |
32 | IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), | 32 | IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), |
33 | AttribName(0), Attribs(0), Index(0), MyParentID(myParentID) | 33 | AttribName(0), Attribs(0), Index(0), MyParentID(myParentID) |
34 | { | 34 | { |
35 | 35 | ||
36 | #ifdef _DEBUG | 36 | #ifdef _DEBUG |
37 | setDebugName("CGUIAttribute"); | 37 | setDebugName("CGUIAttribute"); |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | AttribName = environment->addStaticText(0, | 40 | AttribName = environment->addStaticText(0, |
41 | core::rect<s32>(0, 0, | 41 | core::rect<s32>(0, 0, |
42 | 100, Environment->getSkin()->getFont()->getDimension(L"A").Height), | 42 | 100, Environment->getSkin()->getFont()->getDimension(L"A").Height), |
43 | false, false, this, -1, false); | 43 | false, false, this, -1, false); |
44 | AttribName->grab(); | 44 | AttribName->grab(); |
45 | AttribName->setSubElement(true); | 45 | AttribName->setSubElement(true); |
46 | AttribName->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 46 | AttribName->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
47 | } | 47 | } |
48 | 48 | ||
49 | virtual ~CGUIAttribute() | 49 | virtual ~CGUIAttribute() |
50 | { | 50 | { |
51 | if (Attribs) | 51 | if (Attribs) |
52 | Attribs->drop(); | 52 | Attribs->drop(); |
53 | if (AttribName) | 53 | if (AttribName) |
54 | AttribName->drop(); | 54 | AttribName->drop(); |
55 | } | 55 | } |
56 | 56 | ||
57 | virtual bool OnEvent(const SEvent &e) | 57 | virtual bool OnEvent(const SEvent &e) |
58 | { | 58 | { |
59 | if (IsEnabled) | 59 | if (IsEnabled) |
60 | { | 60 | { |
61 | switch (e.EventType) | 61 | switch (e.EventType) |
62 | { | 62 | { |
63 | case EET_GUI_EVENT: | 63 | case EET_GUI_EVENT: |
64 | switch (e.GUIEvent.EventType) | 64 | switch (e.GUIEvent.EventType) |
65 | { | 65 | { |
66 | case EGET_ELEMENT_FOCUSED: | 66 | case EGET_ELEMENT_FOCUSED: |
67 | if (Parent && isMyChild(e.GUIEvent.Caller)) | 67 | if (Parent && isMyChild(e.GUIEvent.Caller)) |
68 | Parent->bringToFront(this); | 68 | Parent->bringToFront(this); |
69 | break; | 69 | break; |
70 | case EGET_ELEMENT_HOVERED: | 70 | case EGET_ELEMENT_HOVERED: |
71 | case EGET_ELEMENT_LEFT: | 71 | case EGET_ELEMENT_LEFT: |
72 | return IGUIElement::OnEvent(e); | 72 | return IGUIElement::OnEvent(e); |
73 | case EGET_ELEMENT_FOCUS_LOST: | 73 | case EGET_ELEMENT_FOCUS_LOST: |
74 | updateAttrib(); | 74 | updateAttrib(); |
75 | return IGUIElement::OnEvent(e); | 75 | return IGUIElement::OnEvent(e); |
76 | default: | 76 | default: |
77 | return updateAttrib(); | 77 | return updateAttrib(); |
78 | } | 78 | } |
79 | break; | 79 | break; |
80 | case EET_KEY_INPUT_EVENT: | 80 | case EET_KEY_INPUT_EVENT: |
81 | return true; | 81 | return true; |
82 | default: | 82 | default: |
83 | break; | 83 | break; |
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | return IGUIElement::OnEvent(e); | 87 | return IGUIElement::OnEvent(e); |
88 | } | 88 | } |
89 | 89 | ||
90 | //! sets the attribute to use | 90 | //! sets the attribute to use |
91 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) | 91 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) |
92 | { | 92 | { |
93 | if (Attribs) | 93 | if (Attribs) |
94 | Attribs->drop(); | 94 | Attribs->drop(); |
95 | Attribs = attribs; | 95 | Attribs = attribs; |
96 | if (Attribs) | 96 | if (Attribs) |
97 | Attribs->grab(); | 97 | Attribs->grab(); |
98 | Index = attribIndex; | 98 | Index = attribIndex; |
99 | 99 | ||
100 | core::stringw name(attribs->getAttributeName(attribIndex)); | 100 | core::stringw name(attribs->getAttributeName(attribIndex)); |
101 | name += L" ("; | 101 | name += L" ("; |
102 | name += attribs->getAttributeTypeString(attribIndex); | 102 | name += attribs->getAttributeTypeString(attribIndex); |
103 | name += L")"; | 103 | name += L")"; |
104 | AttribName->setText(name.c_str()); | 104 | AttribName->setText(name.c_str()); |
105 | 105 | ||
106 | core::rect<s32> r = Parent->getAbsolutePosition(); | 106 | core::rect<s32> r = Parent->getAbsolutePosition(); |
107 | core::rect<s32> r2(0, 5, | 107 | core::rect<s32> r2(0, 5, |
108 | r.getWidth(), Environment->getSkin()->getFont()->getDimension(L"A").Height + 10 ); | 108 | r.getWidth(), Environment->getSkin()->getFont()->getDimension(L"A").Height + 10 ); |
109 | 109 | ||
110 | AttribName->setRelativePosition(r2); | 110 | AttribName->setRelativePosition(r2); |
111 | 111 | ||
112 | // get minimum height | 112 | // get minimum height |
113 | s32 y=0; | 113 | s32 y=0; |
114 | core::list<IGUIElement*>::Iterator it = Children.begin(); | 114 | core::list<IGUIElement*>::Iterator it = Children.begin(); |
115 | for (; it != Children.end(); ++it) | 115 | for (; it != Children.end(); ++it) |
116 | { | 116 | { |
117 | if (y < (*it)->getRelativePosition().LowerRightCorner.Y) | 117 | if (y < (*it)->getRelativePosition().LowerRightCorner.Y) |
118 | y = (*it)->getRelativePosition().LowerRightCorner.Y; | 118 | y = (*it)->getRelativePosition().LowerRightCorner.Y; |
119 | } | 119 | } |
120 | setMinSize( core::dimension2du(0, y+5)); | 120 | setMinSize( core::dimension2du(0, y+5)); |
121 | 121 | ||
122 | updateAttrib(false); | 122 | updateAttrib(false); |
123 | } | 123 | } |
124 | 124 | ||
125 | //! sets the parent ID, for identifying where events came from | 125 | //! sets the parent ID, for identifying where events came from |
126 | void setParentID(s32 parentID) | 126 | void setParentID(s32 parentID) |
127 | { | 127 | { |
128 | MyParentID = parentID; | 128 | MyParentID = parentID; |
129 | } | 129 | } |
130 | 130 | ||
131 | //! save the attribute and possibly post the event to its parent | 131 | //! save the attribute and possibly post the event to its parent |
132 | virtual bool updateAttrib(bool sendEvent=true) | 132 | virtual bool updateAttrib(bool sendEvent=true) |
133 | { | 133 | { |
134 | if (Attribs && IsEnabled && sendEvent) | 134 | if (Attribs && IsEnabled && sendEvent) |
135 | { | 135 | { |
136 | // build event and pass to parent | 136 | // build event and pass to parent |
137 | SEvent event; | 137 | SEvent event; |
138 | event.EventType = (EEVENT_TYPE)ATTRIBEDIT_ATTRIB_CHANGED; | 138 | event.EventType = (EEVENT_TYPE)ATTRIBEDIT_ATTRIB_CHANGED; |
139 | event.UserEvent.UserData1 = MyParentID; | 139 | event.UserEvent.UserData1 = MyParentID; |
140 | event.UserEvent.UserData2 = Index; | 140 | event.UserEvent.UserData2 = Index; |
141 | return Parent->OnEvent(event); | 141 | return Parent->OnEvent(event); |
142 | } | 142 | } |
143 | 143 | ||
144 | return true; | 144 | return true; |
145 | } | 145 | } |
146 | 146 | ||
147 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) | 147 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) |
148 | { | 148 | { |
149 | IGUIElement::serializeAttributes(out, options); | 149 | IGUIElement::serializeAttributes(out, options); |
150 | } | 150 | } |
151 | 151 | ||
152 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) | 152 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) |
153 | { | 153 | { |
154 | IGUIElement::deserializeAttributes(in, options); | 154 | IGUIElement::deserializeAttributes(in, options); |
155 | if (AttribName) | 155 | if (AttribName) |
156 | AttribName->setText(Text.c_str()); | 156 | AttribName->setText(Text.c_str()); |
157 | } | 157 | } |
158 | 158 | ||
159 | protected: | 159 | protected: |
160 | IGUIStaticText* AttribName; | 160 | IGUIStaticText* AttribName; |
161 | io::IAttributes* Attribs; | 161 | io::IAttributes* Attribs; |
162 | u32 Index; | 162 | u32 Index; |
163 | s32 MyParentID; | 163 | s32 MyParentID; |
164 | }; | 164 | }; |
165 | 165 | ||
166 | } // namespace gui | 166 | } // namespace gui |
167 | } // namespace irr | 167 | } // namespace irr |
168 | 168 | ||
169 | #endif | 169 | #endif |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp index 45913b6..6d61f17 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.cpp | |||
@@ -1,120 +1,120 @@ | |||
1 | 1 | ||
2 | #include "CGUIAttributeEditor.h" | 2 | #include "CGUIAttributeEditor.h" |
3 | #include "IGUIEnvironment.h" | 3 | #include "IGUIEnvironment.h" |
4 | #include "IFileSystem.h" | 4 | #include "IFileSystem.h" |
5 | #include "IVideoDriver.h" | 5 | #include "IVideoDriver.h" |
6 | #include "IAttributes.h" | 6 | #include "IAttributes.h" |
7 | #include "IGUIFont.h" | 7 | #include "IGUIFont.h" |
8 | #include "IGUIScrollBar.h" | 8 | #include "IGUIScrollBar.h" |
9 | #include "CGUIEditWorkspace.h" | 9 | #include "CGUIEditWorkspace.h" |
10 | #include "CGUIAttribute.h" | 10 | #include "CGUIAttribute.h" |
11 | #include "CGUIStringAttribute.h" | 11 | #include "CGUIStringAttribute.h" |
12 | 12 | ||
13 | namespace irr | 13 | namespace irr |
14 | { | 14 | { |
15 | namespace gui | 15 | namespace gui |
16 | { | 16 | { |
17 | 17 | ||
18 | using namespace core; | 18 | using namespace core; |
19 | using namespace io; | 19 | using namespace io; |
20 | 20 | ||
21 | CGUIAttributeEditor::CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent) : | 21 | CGUIAttributeEditor::CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent) : |
22 | CGUIPanel(environment, parent, id, rect<s32>(0, 0, 100, 100)), | 22 | CGUIPanel(environment, parent, id, rect<s32>(0, 0, 100, 100)), |
23 | Attribs(0), Panel(0) | 23 | Attribs(0), Panel(0) |
24 | { | 24 | { |
25 | #ifdef _DEBUG | 25 | #ifdef _DEBUG |
26 | setDebugName("CGUIAttributeEditor"); | 26 | setDebugName("CGUIAttributeEditor"); |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | // create attributes | 29 | // create attributes |
30 | Attribs = environment->getFileSystem()->createEmptyAttributes(Environment->getVideoDriver()); | 30 | Attribs = environment->getFileSystem()->createEmptyAttributes(Environment->getVideoDriver()); |
31 | 31 | ||
32 | calculateClientArea(); | 32 | calculateClientArea(); |
33 | resizeInnerPane(); | 33 | resizeInnerPane(); |
34 | 34 | ||
35 | // refresh attrib list | 35 | // refresh attrib list |
36 | refreshAttribs(); | 36 | refreshAttribs(); |
37 | 37 | ||
38 | IGUIScrollBar* sb = getVScrollBar(); | 38 | IGUIScrollBar* sb = getVScrollBar(); |
39 | core::rect<s32> r = sb->getRelativePosition(); | 39 | core::rect<s32> r = sb->getRelativePosition(); |
40 | r.LowerRightCorner.Y -= 16; | 40 | r.LowerRightCorner.Y -= 16; |
41 | sb->setRelativePosition(r); | 41 | sb->setRelativePosition(r); |
42 | } | 42 | } |
43 | 43 | ||
44 | CGUIAttributeEditor::~CGUIAttributeEditor() | 44 | CGUIAttributeEditor::~CGUIAttributeEditor() |
45 | { | 45 | { |
46 | for (u32 i=0; i<AttribList.size(); ++i) | 46 | for (u32 i=0; i<AttribList.size(); ++i) |
47 | { | 47 | { |
48 | AttribList[i]->remove(); | 48 | AttribList[i]->remove(); |
49 | AttribList[i]->drop(); | 49 | AttribList[i]->drop(); |
50 | } | 50 | } |
51 | AttribList.clear(); | 51 | AttribList.clear(); |
52 | 52 | ||
53 | Attribs->drop(); | 53 | Attribs->drop(); |
54 | } | 54 | } |
55 | 55 | ||
56 | 56 | ||
57 | IAttributes* CGUIAttributeEditor::getAttribs() | 57 | IAttributes* CGUIAttributeEditor::getAttribs() |
58 | { | 58 | { |
59 | return Attribs; | 59 | return Attribs; |
60 | } | 60 | } |
61 | 61 | ||
62 | void CGUIAttributeEditor::refreshAttribs() | 62 | void CGUIAttributeEditor::refreshAttribs() |
63 | { | 63 | { |
64 | // clear the attribute list | 64 | // clear the attribute list |
65 | u32 i; | 65 | u32 i; |
66 | for (i=0; i<AttribList.size(); ++i) | 66 | for (i=0; i<AttribList.size(); ++i) |
67 | { | 67 | { |
68 | AttribList[i]->remove(); | 68 | AttribList[i]->remove(); |
69 | AttribList[i]->drop(); | 69 | AttribList[i]->drop(); |
70 | } | 70 | } |
71 | AttribList.clear(); | 71 | AttribList.clear(); |
72 | 72 | ||
73 | position2di top(10, 5); | 73 | position2di top(10, 5); |
74 | rect<s32> r(top.X, top.Y, | 74 | rect<s32> r(top.X, top.Y, |
75 | getClientArea().getWidth() - 10, | 75 | getClientArea().getWidth() - 10, |
76 | 5 + Environment->getSkin()->getFont()->getDimension(L"A").Height); | 76 | 5 + Environment->getSkin()->getFont()->getDimension(L"A").Height); |
77 | 77 | ||
78 | // add attribute elements | 78 | // add attribute elements |
79 | u32 c = Attribs->getAttributeCount(); | 79 | u32 c = Attribs->getAttributeCount(); |
80 | for (i=0; i<c; ++i) | 80 | for (i=0; i<c; ++i) |
81 | { | 81 | { |
82 | 82 | ||
83 | // try to create attribute | 83 | // try to create attribute |
84 | stringc str = Attribs->getAttributeTypeString(i); | 84 | stringc str = Attribs->getAttributeTypeString(i); |
85 | str += "_attribute"; | 85 | str += "_attribute"; |
86 | CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), 0); | 86 | CGUIAttribute* n = (CGUIAttribute*)Environment->addGUIElement(str.c_str(), 0); |
87 | 87 | ||
88 | // if this doesn't exist, use a string editor | 88 | // if this doesn't exist, use a string editor |
89 | if (!n) | 89 | if (!n) |
90 | n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", 0); | 90 | n = (CGUIAttribute*)Environment->addGUIElement("string_attribute", 0); |
91 | 91 | ||
92 | if (n) | 92 | if (n) |
93 | { | 93 | { |
94 | AttribList.push_back(n); | 94 | AttribList.push_back(n); |
95 | n->setParentID(getID()); | 95 | n->setParentID(getID()); |
96 | n->grab(); | 96 | n->grab(); |
97 | } | 97 | } |
98 | 98 | ||
99 | // We can't set "this" as parent above as we need functionality | 99 | // We can't set "this" as parent above as we need functionality |
100 | // of the overloaded addChild which isn't called in the constructor. | 100 | // of the overloaded addChild which isn't called in the constructor. |
101 | // (that's a general Irrlicht messup with too fat constructors) | 101 | // (that's a general Irrlicht messup with too fat constructors) |
102 | addChild(n); | 102 | addChild(n); |
103 | 103 | ||
104 | AttribList[i]->setSubElement(true); | 104 | AttribList[i]->setSubElement(true); |
105 | AttribList[i]->setRelativePosition(r); | 105 | AttribList[i]->setRelativePosition(r); |
106 | AttribList[i]->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 106 | AttribList[i]->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
107 | AttribList[i]->setAttrib(Attribs, i); | 107 | AttribList[i]->setAttrib(Attribs, i); |
108 | r += position2di(0, AttribList[i]->getRelativePosition().getHeight() + 5); | 108 | r += position2di(0, AttribList[i]->getRelativePosition().getHeight() + 5); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | void CGUIAttributeEditor::updateAttribs() | 112 | void CGUIAttributeEditor::updateAttribs() |
113 | { | 113 | { |
114 | for (u32 i=0; i<AttribList.size(); ++i) | 114 | for (u32 i=0; i<AttribList.size(); ++i) |
115 | AttribList[i]->updateAttrib(false); | 115 | AttribList[i]->updateAttrib(false); |
116 | } | 116 | } |
117 | 117 | ||
118 | } // namespace gui | 118 | } // namespace gui |
119 | } // namespace irr | 119 | } // namespace irr |
120 | 120 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h index 0bcdab5..551fdfd 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIAttributeEditor.h | |||
@@ -1,54 +1,54 @@ | |||
1 | #ifndef __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ | 1 | #ifndef __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ |
2 | #define __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ | 2 | #define __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ |
3 | 3 | ||
4 | #include "IGUIElement.h" | 4 | #include "IGUIElement.h" |
5 | #include "CGUIPanel.h" | 5 | #include "CGUIPanel.h" |
6 | #include "irrArray.h" | 6 | #include "irrArray.h" |
7 | #include "IAttributes.h" | 7 | #include "IAttributes.h" |
8 | #include "EGUIEditTypes.h" | 8 | #include "EGUIEditTypes.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | namespace gui | 12 | namespace gui |
13 | { | 13 | { |
14 | 14 | ||
15 | class CGUIAttribute; | 15 | class CGUIAttribute; |
16 | 16 | ||
17 | 17 | ||
18 | class CGUIAttributeEditor : public CGUIPanel | 18 | class CGUIAttributeEditor : public CGUIPanel |
19 | { | 19 | { |
20 | public: | 20 | public: |
21 | 21 | ||
22 | //! constructor | 22 | //! constructor |
23 | CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent=0); | 23 | CGUIAttributeEditor(IGUIEnvironment* environment, s32 id, IGUIElement *parent=0); |
24 | 24 | ||
25 | //! destructor | 25 | //! destructor |
26 | ~CGUIAttributeEditor(); | 26 | ~CGUIAttributeEditor(); |
27 | 27 | ||
28 | // gets the current attributes list | 28 | // gets the current attributes list |
29 | virtual io::IAttributes* getAttribs(); | 29 | virtual io::IAttributes* getAttribs(); |
30 | 30 | ||
31 | // update the attribute list after making a change | 31 | // update the attribute list after making a change |
32 | void refreshAttribs(); | 32 | void refreshAttribs(); |
33 | 33 | ||
34 | // save the attributes | 34 | // save the attributes |
35 | void updateAttribs(); | 35 | void updateAttribs(); |
36 | 36 | ||
37 | //! Returns the type name of the gui element. | 37 | //! Returns the type name of the gui element. |
38 | virtual const c8* getTypeName() const | 38 | virtual const c8* getTypeName() const |
39 | { | 39 | { |
40 | return GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR]; | 40 | return GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR]; |
41 | } | 41 | } |
42 | 42 | ||
43 | private: | 43 | private: |
44 | 44 | ||
45 | core::array<CGUIAttribute*> AttribList; // attributes editing controls | 45 | core::array<CGUIAttribute*> AttribList; // attributes editing controls |
46 | io::IAttributes* Attribs; // current attributes | 46 | io::IAttributes* Attribs; // current attributes |
47 | CGUIPanel* Panel; | 47 | CGUIPanel* Panel; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | } // end namespace gui | 50 | } // end namespace gui |
51 | } // end namespace irr | 51 | } // end namespace irr |
52 | 52 | ||
53 | #endif // __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ | 53 | #endif // __C_GUI_ATTRIBUTE_EDITOR_H_INCLUDED__ |
54 | 54 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h index b0521db..189bd2d 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIBoolAttribute.h | |||
@@ -1,68 +1,68 @@ | |||
1 | #ifndef __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ | 1 | #ifndef __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ |
2 | #define __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ | 2 | #define __C_GUI_BOOL_ATTRIBUTE_H_INCLUDED__ |
3 | 3 | ||
4 | #include "CGUIAttribute.h" | 4 | #include "CGUIAttribute.h" |
5 | #include "IGUICheckBox.h" | 5 | #include "IGUICheckBox.h" |
6 | #include "EGUIEditTypes.h" | 6 | #include "EGUIEditTypes.h" |
7 | 7 | ||
8 | namespace irr | 8 | namespace irr |
9 | { | 9 | { |
10 | namespace gui | 10 | namespace gui |
11 | { | 11 | { |
12 | 12 | ||
13 | class CGUIBoolAttribute : public CGUIAttribute | 13 | class CGUIBoolAttribute : public CGUIAttribute |
14 | { | 14 | { |
15 | public: | 15 | public: |
16 | // | 16 | // |
17 | CGUIBoolAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : | 17 | CGUIBoolAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : |
18 | CGUIAttribute(environment, parent, myParentID), AttribCheckBox(0) | 18 | CGUIAttribute(environment, parent, myParentID), AttribCheckBox(0) |
19 | { | 19 | { |
20 | 20 | ||
21 | core::rect<s32> r = getAbsolutePosition(); | 21 | core::rect<s32> r = getAbsolutePosition(); |
22 | core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, | 22 | core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, |
23 | r.getWidth() - 5, | 23 | r.getWidth() - 5, |
24 | Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); | 24 | Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); |
25 | 25 | ||
26 | AttribCheckBox = environment->addCheckBox(false, r2, this); | 26 | AttribCheckBox = environment->addCheckBox(false, r2, this); |
27 | AttribCheckBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 27 | AttribCheckBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
28 | AttribCheckBox->setSubElement(true); | 28 | AttribCheckBox->setSubElement(true); |
29 | AttribCheckBox->grab(); | 29 | AttribCheckBox->grab(); |
30 | } | 30 | } |
31 | 31 | ||
32 | virtual ~CGUIBoolAttribute() | 32 | virtual ~CGUIBoolAttribute() |
33 | { | 33 | { |
34 | if (AttribCheckBox) | 34 | if (AttribCheckBox) |
35 | AttribCheckBox->drop(); | 35 | AttribCheckBox->drop(); |
36 | } | 36 | } |
37 | 37 | ||
38 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) | 38 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) |
39 | { | 39 | { |
40 | AttribCheckBox->setChecked(attribs->getAttributeAsBool(attribIndex)); | 40 | AttribCheckBox->setChecked(attribs->getAttributeAsBool(attribIndex)); |
41 | CGUIAttribute::setAttrib(attribs, attribIndex); | 41 | CGUIAttribute::setAttrib(attribs, attribIndex); |
42 | } | 42 | } |
43 | 43 | ||
44 | // save the attribute and possibly post the event to its parent | 44 | // save the attribute and possibly post the event to its parent |
45 | virtual bool updateAttrib(bool sendEvent=true) | 45 | virtual bool updateAttrib(bool sendEvent=true) |
46 | { | 46 | { |
47 | if (!Attribs) | 47 | if (!Attribs) |
48 | return true; | 48 | return true; |
49 | 49 | ||
50 | Attribs->setAttribute(Index, AttribCheckBox->isChecked()); | 50 | Attribs->setAttribute(Index, AttribCheckBox->isChecked()); |
51 | 51 | ||
52 | return CGUIAttribute::updateAttrib(sendEvent); | 52 | return CGUIAttribute::updateAttrib(sendEvent); |
53 | } | 53 | } |
54 | 54 | ||
55 | //! Returns the type name of the gui element. | 55 | //! Returns the type name of the gui element. |
56 | virtual const c8* getTypeName() const | 56 | virtual const c8* getTypeName() const |
57 | { | 57 | { |
58 | return GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE]; | 58 | return GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE]; |
59 | } | 59 | } |
60 | 60 | ||
61 | private: | 61 | private: |
62 | IGUICheckBox* AttribCheckBox; | 62 | IGUICheckBox* AttribCheckBox; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | } // namespace gui | 65 | } // namespace gui |
66 | } // namespace irr | 66 | } // namespace irr |
67 | 67 | ||
68 | #endif | 68 | #endif |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h index e0c5212..d14b7a1 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIColorAttribute.h | |||
@@ -1,179 +1,179 @@ | |||
1 | #ifndef __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ | 1 | #ifndef __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ |
2 | #define __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ | 2 | #define __C_GUI_COLOR_ATTRIBUTE_H_INCLUDED__ |
3 | 3 | ||
4 | #include "CGUIAttribute.h" | 4 | #include "CGUIAttribute.h" |
5 | #include "IGUIStaticText.h" | 5 | #include "IGUIStaticText.h" |
6 | #include "IGUIScrollBar.h" | 6 | #include "IGUIScrollBar.h" |
7 | #include "IGUITabControl.h" | 7 | #include "IGUITabControl.h" |
8 | #include "EGUIEditTypes.h" | 8 | #include "EGUIEditTypes.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | namespace gui | 12 | namespace gui |
13 | { | 13 | { |
14 | class CGUIColorAttribute : public CGUIAttribute | 14 | class CGUIColorAttribute : public CGUIAttribute |
15 | { | 15 | { |
16 | public: | 16 | public: |
17 | // | 17 | // |
18 | CGUIColorAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : | 18 | CGUIColorAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : |
19 | CGUIAttribute(environment, parent, myParentID), | 19 | CGUIAttribute(environment, parent, myParentID), |
20 | AttribSliderA(0), AttribSliderR(0), AttribSliderG(0), AttribSliderB(0), | 20 | AttribSliderA(0), AttribSliderR(0), AttribSliderG(0), AttribSliderB(0), |
21 | AttribEditBox(0), AttribColor(0) | 21 | AttribEditBox(0), AttribColor(0) |
22 | { | 22 | { |
23 | s32 fh = Environment->getSkin()->getFont()->getDimension(L"A").Height; | 23 | s32 fh = Environment->getSkin()->getFont()->getDimension(L"A").Height; |
24 | 24 | ||
25 | core::rect<s32> r0(getAbsolutePosition()), | 25 | core::rect<s32> r0(getAbsolutePosition()), |
26 | r2(0, fh + 5, r0.getWidth() - 5, fh*2 + 10 ), | 26 | r2(0, fh + 5, r0.getWidth() - 5, fh*2 + 10 ), |
27 | r3(r2), | 27 | r3(r2), |
28 | r4(r2.getWidth() - 20, 3, r2.getWidth() - 3, r2.getHeight()-3); | 28 | r4(r2.getWidth() - 20, 3, r2.getWidth() - 3, r2.getHeight()-3); |
29 | 29 | ||
30 | AttribColor = Environment->addTab(r4, this, 0); | 30 | AttribColor = Environment->addTab(r4, this, 0); |
31 | AttribColor->grab(); | 31 | AttribColor->grab(); |
32 | AttribColor->setDrawBackground(true); | 32 | AttribColor->setDrawBackground(true); |
33 | AttribColor->setSubElement(true); | 33 | AttribColor->setSubElement(true); |
34 | AttribColor->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 34 | AttribColor->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
35 | 35 | ||
36 | s32 h=2; | 36 | s32 h=2; |
37 | r2 += core::position2di(0, h*4 + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)*2); | 37 | r2 += core::position2di(0, h*4 + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)*2); |
38 | r3.LowerRightCorner.Y = r3.UpperLeftCorner.Y + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)/2; | 38 | r3.LowerRightCorner.Y = r3.UpperLeftCorner.Y + Environment->getSkin()->getSize(EGDS_WINDOW_BUTTON_WIDTH)/2; |
39 | 39 | ||
40 | AttribSliderA = environment->addScrollBar(true, r3, this, -1); | 40 | AttribSliderA = environment->addScrollBar(true, r3, this, -1); |
41 | AttribSliderA->setMax(255); | 41 | AttribSliderA->setMax(255); |
42 | AttribSliderA->grab(); | 42 | AttribSliderA->grab(); |
43 | AttribSliderA->setSubElement(true); | 43 | AttribSliderA->setSubElement(true); |
44 | AttribSliderA->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 44 | AttribSliderA->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
45 | r3 += core::position2di(0, r3.getHeight()+h); | 45 | r3 += core::position2di(0, r3.getHeight()+h); |
46 | AttribSliderR = environment->addScrollBar(true, r3, this, -1); | 46 | AttribSliderR = environment->addScrollBar(true, r3, this, -1); |
47 | AttribSliderR->setMax(255); | 47 | AttribSliderR->setMax(255); |
48 | AttribSliderR->grab(); | 48 | AttribSliderR->grab(); |
49 | AttribSliderR->setSubElement(true); | 49 | AttribSliderR->setSubElement(true); |
50 | AttribSliderR->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 50 | AttribSliderR->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
51 | r3 += core::position2di(0, r3.getHeight()+h); | 51 | r3 += core::position2di(0, r3.getHeight()+h); |
52 | AttribSliderG = environment->addScrollBar(true, r3, this, -1); | 52 | AttribSliderG = environment->addScrollBar(true, r3, this, -1); |
53 | AttribSliderG->setMax(255); | 53 | AttribSliderG->setMax(255); |
54 | AttribSliderG->grab(); | 54 | AttribSliderG->grab(); |
55 | AttribSliderG->setSubElement(true); | 55 | AttribSliderG->setSubElement(true); |
56 | AttribSliderG->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 56 | AttribSliderG->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
57 | r3 += core::position2di(0, r3.getHeight()+h); | 57 | r3 += core::position2di(0, r3.getHeight()+h); |
58 | AttribSliderB = environment->addScrollBar(true, r3, this, -1); | 58 | AttribSliderB = environment->addScrollBar(true, r3, this, -1); |
59 | AttribSliderB->setMax(255); | 59 | AttribSliderB->setMax(255); |
60 | AttribSliderB->grab(); | 60 | AttribSliderB->grab(); |
61 | AttribSliderB->setSubElement(true); | 61 | AttribSliderB->setSubElement(true); |
62 | AttribSliderB->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 62 | AttribSliderB->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
63 | 63 | ||
64 | // add editbox | 64 | // add editbox |
65 | AttribEditBox = environment->addEditBox( | 65 | AttribEditBox = environment->addEditBox( |
66 | L"", | 66 | L"", |
67 | r2, | 67 | r2, |
68 | true, this, -1); | 68 | true, this, -1); |
69 | AttribEditBox->grab(); | 69 | AttribEditBox->grab(); |
70 | AttribEditBox->setSubElement(true); | 70 | AttribEditBox->setSubElement(true); |
71 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 71 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
72 | } | 72 | } |
73 | 73 | ||
74 | virtual ~CGUIColorAttribute() | 74 | virtual ~CGUIColorAttribute() |
75 | { | 75 | { |
76 | if (AttribSliderA) | 76 | if (AttribSliderA) |
77 | AttribSliderA->drop(); | 77 | AttribSliderA->drop(); |
78 | if (AttribSliderR) | 78 | if (AttribSliderR) |
79 | AttribSliderR->drop(); | 79 | AttribSliderR->drop(); |
80 | if (AttribSliderG) | 80 | if (AttribSliderG) |
81 | AttribSliderG->drop(); | 81 | AttribSliderG->drop(); |
82 | if (AttribSliderB) | 82 | if (AttribSliderB) |
83 | AttribSliderB->drop(); | 83 | AttribSliderB->drop(); |
84 | if (AttribEditBox) | 84 | if (AttribEditBox) |
85 | AttribEditBox->drop(); | 85 | AttribEditBox->drop(); |
86 | if (AttribColor) | 86 | if (AttribColor) |
87 | AttribColor->drop(); | 87 | AttribColor->drop(); |
88 | } | 88 | } |
89 | 89 | ||
90 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) | 90 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) |
91 | { | 91 | { |
92 | video::SColor col = attribs->getAttributeAsColor(attribIndex); | 92 | video::SColor col = attribs->getAttributeAsColor(attribIndex); |
93 | 93 | ||
94 | AttribSliderA->setPos(col.getAlpha()); | 94 | AttribSliderA->setPos(col.getAlpha()); |
95 | AttribSliderR->setPos(col.getRed()); | 95 | AttribSliderR->setPos(col.getRed()); |
96 | AttribSliderG->setPos(col.getGreen()); | 96 | AttribSliderG->setPos(col.getGreen()); |
97 | AttribSliderB->setPos(col.getBlue()); | 97 | AttribSliderB->setPos(col.getBlue()); |
98 | AttribEditBox->setText( attribs->getAttributeAsStringW(attribIndex).c_str() ); | 98 | AttribEditBox->setText( attribs->getAttributeAsStringW(attribIndex).c_str() ); |
99 | AttribColor->setBackgroundColor(col); | 99 | AttribColor->setBackgroundColor(col); |
100 | 100 | ||
101 | CGUIAttribute::setAttrib(attribs, attribIndex); | 101 | CGUIAttribute::setAttrib(attribs, attribIndex); |
102 | } | 102 | } |
103 | 103 | ||
104 | virtual bool OnEvent(const SEvent &e) | 104 | virtual bool OnEvent(const SEvent &e) |
105 | { | 105 | { |
106 | switch (e.EventType) | 106 | switch (e.EventType) |
107 | { | 107 | { |
108 | 108 | ||
109 | case EET_GUI_EVENT: | 109 | case EET_GUI_EVENT: |
110 | switch (e.GUIEvent.EventType) | 110 | switch (e.GUIEvent.EventType) |
111 | { | 111 | { |
112 | case EGET_EDITBOX_ENTER: | 112 | case EGET_EDITBOX_ENTER: |
113 | case EGET_ELEMENT_FOCUS_LOST: | 113 | case EGET_ELEMENT_FOCUS_LOST: |
114 | if (e.GUIEvent.Caller == AttribEditBox) | 114 | if (e.GUIEvent.Caller == AttribEditBox) |
115 | { | 115 | { |
116 | // update scrollbars from textbox | 116 | // update scrollbars from textbox |
117 | Attribs->setAttribute(Index, AttribEditBox->getText()); | 117 | Attribs->setAttribute(Index, AttribEditBox->getText()); |
118 | video::SColor col = Attribs->getAttributeAsColor(Index); | 118 | video::SColor col = Attribs->getAttributeAsColor(Index); |
119 | AttribSliderA->setPos(col.getAlpha()); | 119 | AttribSliderA->setPos(col.getAlpha()); |
120 | AttribSliderR->setPos(col.getRed()); | 120 | AttribSliderR->setPos(col.getRed()); |
121 | AttribSliderG->setPos(col.getGreen()); | 121 | AttribSliderG->setPos(col.getGreen()); |
122 | AttribSliderB->setPos(col.getBlue()); | 122 | AttribSliderB->setPos(col.getBlue()); |
123 | // update colour | 123 | // update colour |
124 | AttribColor->setBackgroundColor(col); | 124 | AttribColor->setBackgroundColor(col); |
125 | } | 125 | } |
126 | break; | 126 | break; |
127 | case EGET_SCROLL_BAR_CHANGED: | 127 | case EGET_SCROLL_BAR_CHANGED: |
128 | { | 128 | { |
129 | // update editbox from scrollbars | 129 | // update editbox from scrollbars |
130 | video::SColor col( AttribSliderA->getPos(), AttribSliderR->getPos(), | 130 | video::SColor col( AttribSliderA->getPos(), AttribSliderR->getPos(), |
131 | AttribSliderG->getPos(), AttribSliderB->getPos()); | 131 | AttribSliderG->getPos(), AttribSliderB->getPos()); |
132 | 132 | ||
133 | Attribs->setAttribute(Index, col); | 133 | Attribs->setAttribute(Index, col); |
134 | AttribEditBox->setText( Attribs->getAttributeAsStringW(Index).c_str()); | 134 | AttribEditBox->setText( Attribs->getAttributeAsStringW(Index).c_str()); |
135 | // update colour | 135 | // update colour |
136 | AttribColor->setBackgroundColor(col); | 136 | AttribColor->setBackgroundColor(col); |
137 | } | 137 | } |
138 | return updateAttrib(); | 138 | return updateAttrib(); |
139 | default: | 139 | default: |
140 | break; | 140 | break; |
141 | } | 141 | } |
142 | break; | 142 | break; |
143 | default: | 143 | default: |
144 | break; | 144 | break; |
145 | } | 145 | } |
146 | return CGUIAttribute::OnEvent(e); | 146 | return CGUIAttribute::OnEvent(e); |
147 | } | 147 | } |
148 | 148 | ||
149 | // save the attribute and possibly post the event to its parent | 149 | // save the attribute and possibly post the event to its parent |
150 | virtual bool updateAttrib(bool sendEvent=true) | 150 | virtual bool updateAttrib(bool sendEvent=true) |
151 | { | 151 | { |
152 | if (!Attribs) | 152 | if (!Attribs) |
153 | return true; | 153 | return true; |
154 | 154 | ||
155 | Attribs->setAttribute(Index, AttribEditBox->getText()); | 155 | Attribs->setAttribute(Index, AttribEditBox->getText()); |
156 | AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); | 156 | AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); |
157 | return CGUIAttribute::updateAttrib(sendEvent); | 157 | return CGUIAttribute::updateAttrib(sendEvent); |
158 | } | 158 | } |
159 | 159 | ||
160 | //! Returns the type name of the gui element. | 160 | //! Returns the type name of the gui element. |
161 | virtual const c8* getTypeName() const | 161 | virtual const c8* getTypeName() const |
162 | { | 162 | { |
163 | return GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE]; | 163 | return GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE]; |
164 | } | 164 | } |
165 | 165 | ||
166 | private: | 166 | private: |
167 | IGUIScrollBar* AttribSliderA; | 167 | IGUIScrollBar* AttribSliderA; |
168 | IGUIScrollBar* AttribSliderR; | 168 | IGUIScrollBar* AttribSliderR; |
169 | IGUIScrollBar* AttribSliderG; | 169 | IGUIScrollBar* AttribSliderG; |
170 | IGUIScrollBar* AttribSliderB; | 170 | IGUIScrollBar* AttribSliderB; |
171 | IGUIEditBox* AttribEditBox; | 171 | IGUIEditBox* AttribEditBox; |
172 | IGUITab* AttribColor; | 172 | IGUITab* AttribColor; |
173 | }; | 173 | }; |
174 | 174 | ||
175 | } // namespace gui | 175 | } // namespace gui |
176 | } // namespace irr | 176 | } // namespace irr |
177 | 177 | ||
178 | #endif | 178 | #endif |
179 | 179 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h index 635501a..b373b2d 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIDummyEditorStub.h | |||
@@ -1,59 +1,59 @@ | |||
1 | /* | 1 | /* |
2 | This is a custom editor for stubbing problematic elements out, | 2 | This is a custom editor for stubbing problematic elements out, |
3 | for example elements which include modal screens | 3 | for example elements which include modal screens |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ | 6 | #ifndef __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ |
7 | #define __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ | 7 | #define __C_GUI_DUMMY_EDITOR_STUB_H_INCLUDED__ |
8 | 8 | ||
9 | #include "IGUIElement.h" | 9 | #include "IGUIElement.h" |
10 | #include "IGUIEnvironment.h" | 10 | #include "IGUIEnvironment.h" |
11 | #include "IGUIStaticText.h" | 11 | #include "IGUIStaticText.h" |
12 | 12 | ||
13 | namespace irr | 13 | namespace irr |
14 | { | 14 | { |
15 | 15 | ||
16 | namespace gui | 16 | namespace gui |
17 | { | 17 | { |
18 | class CGUIDummyEditorStub : public IGUIElement | 18 | class CGUIDummyEditorStub : public IGUIElement |
19 | { | 19 | { |
20 | public: | 20 | public: |
21 | //! constructor | 21 | //! constructor |
22 | CGUIDummyEditorStub(IGUIEnvironment* environment, IGUIElement *parent, const char *text) : | 22 | CGUIDummyEditorStub(IGUIEnvironment* environment, IGUIElement *parent, const char *text) : |
23 | IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), | 23 | IGUIElement(EGUIET_ELEMENT, environment, parent, -1, core::rect<s32>(0, 0, 100, 100) ), |
24 | TextBox(0), TypeName(text) | 24 | TextBox(0), TypeName(text) |
25 | { | 25 | { |
26 | 26 | ||
27 | #ifdef _DEBUG | 27 | #ifdef _DEBUG |
28 | setDebugName("CGUIDummyEditorStub"); | 28 | setDebugName("CGUIDummyEditorStub"); |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | core::dimension2du d = Environment->getSkin()->getFont()->getDimension(L"A"); | 31 | core::dimension2du d = Environment->getSkin()->getFont()->getDimension(L"A"); |
32 | s32 h = d.Height / 2; | 32 | s32 h = d.Height / 2; |
33 | s32 w = d.Width / 2; | 33 | s32 w = d.Width / 2; |
34 | 34 | ||
35 | TextBox = environment->addStaticText(core::stringw(text).c_str(), | 35 | TextBox = environment->addStaticText(core::stringw(text).c_str(), |
36 | core::rect<s32>(50-w, 50-h, 50+w, 50+h), | 36 | core::rect<s32>(50-w, 50-h, 50+w, 50+h), |
37 | false, false, this, -1, false); | 37 | false, false, this, -1, false); |
38 | TextBox->grab(); | 38 | TextBox->grab(); |
39 | TextBox->setSubElement(true); | 39 | TextBox->setSubElement(true); |
40 | TextBox->setAlignment(EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER); | 40 | TextBox->setAlignment(EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER, EGUIA_CENTER); |
41 | } | 41 | } |
42 | 42 | ||
43 | virtual ~CGUIDummyEditorStub() | 43 | virtual ~CGUIDummyEditorStub() |
44 | { | 44 | { |
45 | if (TextBox) | 45 | if (TextBox) |
46 | TextBox->drop(); | 46 | TextBox->drop(); |
47 | } | 47 | } |
48 | virtual const c8* getTypeName() const { return TypeName.c_str(); } | 48 | virtual const c8* getTypeName() const { return TypeName.c_str(); } |
49 | 49 | ||
50 | protected: | 50 | protected: |
51 | IGUIStaticText* TextBox; | 51 | IGUIStaticText* TextBox; |
52 | core::stringc TypeName; | 52 | core::stringc TypeName; |
53 | 53 | ||
54 | }; | 54 | }; |
55 | 55 | ||
56 | } // namespace gui | 56 | } // namespace gui |
57 | } // namespace irr | 57 | } // namespace irr |
58 | 58 | ||
59 | #endif | 59 | #endif |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp index 9552745..0748360 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.cpp | |||
@@ -1,120 +1,120 @@ | |||
1 | #include "CGUIEditFactory.h" | 1 | #include "CGUIEditFactory.h" |
2 | #include "IGUIEnvironment.h" | 2 | #include "IGUIEnvironment.h" |
3 | #include "irrString.h" | 3 | #include "irrString.h" |
4 | 4 | ||
5 | #include "EGUIEditTypes.h" | 5 | #include "EGUIEditTypes.h" |
6 | 6 | ||
7 | #include "CGUIEditWorkspace.h" | 7 | #include "CGUIEditWorkspace.h" |
8 | #include "CGUIEditWindow.h" | 8 | #include "CGUIEditWindow.h" |
9 | #include "CGUIPanel.h" | 9 | #include "CGUIPanel.h" |
10 | #include "CGUITextureCacheBrowser.h" | 10 | #include "CGUITextureCacheBrowser.h" |
11 | #include "CGUIAttributeEditor.h" | 11 | #include "CGUIAttributeEditor.h" |
12 | #include "CGUIStringAttribute.h" | 12 | #include "CGUIStringAttribute.h" |
13 | #include "CGUIBoolAttribute.h" | 13 | #include "CGUIBoolAttribute.h" |
14 | #include "CGUIEnumAttribute.h" | 14 | #include "CGUIEnumAttribute.h" |
15 | #include "CGUIColorAttribute.h" | 15 | #include "CGUIColorAttribute.h" |
16 | #include "CGUITextureAttribute.h" | 16 | #include "CGUITextureAttribute.h" |
17 | #include "CGUIDummyEditorStub.h" | 17 | #include "CGUIDummyEditorStub.h" |
18 | 18 | ||
19 | namespace irr | 19 | namespace irr |
20 | { | 20 | { |
21 | namespace gui | 21 | namespace gui |
22 | { | 22 | { |
23 | 23 | ||
24 | CGUIEditFactory::CGUIEditFactory(IGUIEnvironment* env) | 24 | CGUIEditFactory::CGUIEditFactory(IGUIEnvironment* env) |
25 | : Environment(env) | 25 | : Environment(env) |
26 | { | 26 | { |
27 | #ifdef _DEBUG | 27 | #ifdef _DEBUG |
28 | setDebugName("CGUIEditFactory"); | 28 | setDebugName("CGUIEditFactory"); |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | // don't grab the gui environment here to prevent cyclic references | 31 | // don't grab the gui environment here to prevent cyclic references |
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
35 | CGUIEditFactory::~CGUIEditFactory() | 35 | CGUIEditFactory::~CGUIEditFactory() |
36 | { | 36 | { |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
40 | //! adds an element to the environment based on its type name | 40 | //! adds an element to the environment based on its type name |
41 | IGUIElement* CGUIEditFactory::addGUIElement(const c8* typeName, IGUIElement* parent) | 41 | IGUIElement* CGUIEditFactory::addGUIElement(const c8* typeName, IGUIElement* parent) |
42 | { | 42 | { |
43 | /* | 43 | /* |
44 | here we create elements, add them to the manager, and then drop them | 44 | here we create elements, add them to the manager, and then drop them |
45 | */ | 45 | */ |
46 | 46 | ||
47 | core::stringc elementType(typeName); | 47 | core::stringc elementType(typeName); |
48 | IGUIElement* ret=0; | 48 | IGUIElement* ret=0; |
49 | if (!parent) | 49 | if (!parent) |
50 | parent = Environment->getRootGUIElement(); | 50 | parent = Environment->getRootGUIElement(); |
51 | 51 | ||
52 | // editor workspace | 52 | // editor workspace |
53 | if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDIT])) | 53 | if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDIT])) |
54 | ret = new CGUIEditWorkspace(Environment, -1, 0); | 54 | ret = new CGUIEditWorkspace(Environment, -1, 0); |
55 | // editor window | 55 | // editor window |
56 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW])) | 56 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW])) |
57 | ret = new CGUIEditWindow(Environment, core::rect<s32>(0,0,100,100), 0); | 57 | ret = new CGUIEditWindow(Environment, core::rect<s32>(0,0,100,100), 0); |
58 | // Klasker's GUI Panel | 58 | // Klasker's GUI Panel |
59 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIPANEL])) | 59 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_GUIPANEL])) |
60 | ret = new CGUIPanel(Environment, 0); | 60 | ret = new CGUIPanel(Environment, 0); |
61 | // texture cache browser | 61 | // texture cache browser |
62 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREBROWSER])) | 62 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREBROWSER])) |
63 | ret = new CGUITextureCacheBrowser(Environment, -1, 0); | 63 | ret = new CGUITextureCacheBrowser(Environment, -1, 0); |
64 | // block of attribute editors | 64 | // block of attribute editors |
65 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR])) | 65 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ATTRIBUTEEDITOR])) |
66 | ret = new CGUIAttributeEditor(Environment, -1, 0); | 66 | ret = new CGUIAttributeEditor(Environment, -1, 0); |
67 | //! single attribute editors | 67 | //! single attribute editors |
68 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE])) | 68 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE])) |
69 | ret = new CGUIStringAttribute(Environment, 0, -1); | 69 | ret = new CGUIStringAttribute(Environment, 0, -1); |
70 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE])) | 70 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_BOOLATTRIBUTE])) |
71 | ret = new CGUIBoolAttribute(Environment, 0, -1); | 71 | ret = new CGUIBoolAttribute(Environment, 0, -1); |
72 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE])) | 72 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE])) |
73 | ret = new CGUIEnumAttribute(Environment, 0, -1); | 73 | ret = new CGUIEnumAttribute(Environment, 0, -1); |
74 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE])) | 74 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORATTRIBUTE])) |
75 | ret = new CGUIColorAttribute(Environment, 0, -1); | 75 | ret = new CGUIColorAttribute(Environment, 0, -1); |
76 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORFATTRIBUTE])) | 76 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORFATTRIBUTE])) |
77 | ret = new CGUIColorAttribute(Environment, 0, -1); | 77 | ret = new CGUIColorAttribute(Environment, 0, -1); |
78 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE])) | 78 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE])) |
79 | ret = new CGUITextureAttribute(Environment, 0, -1); | 79 | ret = new CGUITextureAttribute(Environment, 0, -1); |
80 | // stubs and custom editors | 80 | // stubs and custom editors |
81 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_CONTEXTMENUEDITOR]) || | 81 | else if (elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_CONTEXTMENUEDITOR]) || |
82 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MENUEDITOR]) || | 82 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MENUEDITOR]) || |
83 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_FILEDIALOGEDITOR]) || | 83 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_FILEDIALOGEDITOR]) || |
84 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORDIALOGEDITOR]) || | 84 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_COLORDIALOGEDITOR]) || |
85 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MODALSCREENEDITOR]) ) | 85 | elementType == core::stringc(GUIEditElementTypeNames[EGUIEDIT_MODALSCREENEDITOR]) ) |
86 | ret = new CGUIDummyEditorStub(Environment, 0, typeName); | 86 | ret = new CGUIDummyEditorStub(Environment, 0, typeName); |
87 | 87 | ||
88 | // add the element to its parent | 88 | // add the element to its parent |
89 | if (ret) | 89 | if (ret) |
90 | parent->addChild(ret); | 90 | parent->addChild(ret); |
91 | 91 | ||
92 | // the environment now has the reference, so we can drop the element | 92 | // the environment now has the reference, so we can drop the element |
93 | if (ret) | 93 | if (ret) |
94 | ret->drop(); | 94 | ret->drop(); |
95 | 95 | ||
96 | return ret; | 96 | return ret; |
97 | } | 97 | } |
98 | 98 | ||
99 | 99 | ||
100 | //! returns amount of element types this factory is able to create | 100 | //! returns amount of element types this factory is able to create |
101 | s32 CGUIEditFactory::getCreatableGUIElementTypeCount() const | 101 | s32 CGUIEditFactory::getCreatableGUIElementTypeCount() const |
102 | { | 102 | { |
103 | return EGUIEDIT_COUNT; | 103 | return EGUIEDIT_COUNT; |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
107 | //! returns type name of a createable element type | 107 | //! returns type name of a createable element type |
108 | const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx) const | 108 | const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx) const |
109 | { | 109 | { |
110 | if (idx>=0 && idx<EGUIEDIT_COUNT) | 110 | if (idx>=0 && idx<EGUIEDIT_COUNT) |
111 | return GUIEditElementTypeNames[idx]; | 111 | return GUIEditElementTypeNames[idx]; |
112 | 112 | ||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | 116 | ||
117 | 117 | ||
118 | } // end namespace gui | 118 | } // end namespace gui |
119 | } // end namespace irr | 119 | } // end namespace irr |
120 | 120 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h index e6f8815..b697942 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditFactory.h | |||
@@ -1,53 +1,53 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__ | 5 | #ifndef __C_GUIEDIT_FACTORY_H_INCLUDED__ |
6 | #define __C_GUIEDIT_FACTORY_H_INCLUDED__ | 6 | #define __C_GUIEDIT_FACTORY_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IGUIElementFactory.h" | 8 | #include "IGUIElementFactory.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | namespace gui | 12 | namespace gui |
13 | { | 13 | { |
14 | class IGUIElement; | 14 | class IGUIElement; |
15 | class IGUIEnvironment; | 15 | class IGUIEnvironment; |
16 | 16 | ||
17 | //! Interface making it possible to dynamicly create gui elements | 17 | //! Interface making it possible to dynamicly create gui elements |
18 | class CGUIEditFactory : public IGUIElementFactory | 18 | class CGUIEditFactory : public IGUIElementFactory |
19 | { | 19 | { |
20 | public: | 20 | public: |
21 | 21 | ||
22 | CGUIEditFactory(IGUIEnvironment* env); | 22 | CGUIEditFactory(IGUIEnvironment* env); |
23 | ~CGUIEditFactory(); | 23 | ~CGUIEditFactory(); |
24 | 24 | ||
25 | //! adds a GUI element to the GUI Environment based on its type name | 25 | //! adds a GUI element to the GUI Environment based on its type name |
26 | /** \param typeName: Type name of the element to add. | 26 | /** \param typeName: Type name of the element to add. |
27 | \param parent: Parent scene node of the new element, can be null to add it to the root. | 27 | \param parent: Parent scene node of the new element, can be null to add it to the root. |
28 | \return Returns pointer to the new element or null if not successful. */ | 28 | \return Returns pointer to the new element or null if not successful. */ |
29 | virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0); | 29 | virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0); |
30 | 30 | ||
31 | //! returns amount of GUI element types this factory is able to create | 31 | //! returns amount of GUI element types this factory is able to create |
32 | virtual s32 getCreatableGUIElementTypeCount() const; | 32 | virtual s32 getCreatableGUIElementTypeCount() const; |
33 | 33 | ||
34 | //! returns type name of a createable GUI element type by index | 34 | //! returns type name of a createable GUI element type by index |
35 | /** \param idx: Index of the type in this factory. Must be a value between 0 and | 35 | /** \param idx: Index of the type in this factory. Must be a value between 0 and |
36 | getCreatableGUIElementTypeCount() */ | 36 | getCreatableGUIElementTypeCount() */ |
37 | virtual const c8* getCreateableGUIElementTypeName(s32 idx) const; | 37 | virtual const c8* getCreateableGUIElementTypeName(s32 idx) const; |
38 | 38 | ||
39 | // not used: | 39 | // not used: |
40 | virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ; | 40 | virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ; |
41 | virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;}; | 41 | virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;}; |
42 | virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;}; | 42 | virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;}; |
43 | private: | 43 | private: |
44 | 44 | ||
45 | IGUIEnvironment* Environment; | 45 | IGUIEnvironment* Environment; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | 48 | ||
49 | } // end namespace scene | 49 | } // end namespace scene |
50 | } // end namespace irr | 50 | } // end namespace irr |
51 | 51 | ||
52 | #endif | 52 | #endif |
53 | 53 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp index 2ff96ae..23221ec 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.cpp | |||
@@ -1,356 +1,356 @@ | |||
1 | 1 | ||
2 | #include "CGUIEditWindow.h" | 2 | #include "CGUIEditWindow.h" |
3 | #include "IGUISkin.h" | 3 | #include "IGUISkin.h" |
4 | #include "IGUIEnvironment.h" | 4 | #include "IGUIEnvironment.h" |
5 | #include "IGUIElementFactory.h" | 5 | #include "IGUIElementFactory.h" |
6 | #include "IAttributes.h" | 6 | #include "IAttributes.h" |
7 | #include "IGUIFont.h" | 7 | #include "IGUIFont.h" |
8 | #include "IGUITabControl.h" | 8 | #include "IGUITabControl.h" |
9 | #include "IGUITreeView.h" | 9 | #include "IGUITreeView.h" |
10 | #include "CGUIEditWorkspace.h" | 10 | #include "CGUIEditWorkspace.h" |
11 | 11 | ||
12 | using namespace irr; | 12 | using namespace irr; |
13 | using namespace gui; | 13 | using namespace gui; |
14 | 14 | ||
15 | //! constructor | 15 | //! constructor |
16 | CGUIEditWindow::CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent) | 16 | CGUIEditWindow::CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent) |
17 | : IGUIWindow(environment, parent, -1, rectangle), | 17 | : IGUIWindow(environment, parent, -1, rectangle), |
18 | Dragging(false), IsDraggable(true), Resizing(false), SelectedElement(0), | 18 | Dragging(false), IsDraggable(true), Resizing(false), SelectedElement(0), |
19 | AttribEditor(0), OptionEditor(0), EnvEditor(0) | 19 | AttribEditor(0), OptionEditor(0), EnvEditor(0) |
20 | { | 20 | { |
21 | #ifdef _DEBUG | 21 | #ifdef _DEBUG |
22 | setDebugName("CGUIEditWindow"); | 22 | setDebugName("CGUIEditWindow"); |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | // we can't tab out of this window | 25 | // we can't tab out of this window |
26 | setTabGroup(true); | 26 | setTabGroup(true); |
27 | // we can ctrl+tab to it | 27 | // we can ctrl+tab to it |
28 | setTabStop(true); | 28 | setTabStop(true); |
29 | // the tab order number is auto-assigned | 29 | // the tab order number is auto-assigned |
30 | setTabOrder(-1); | 30 | setTabOrder(-1); |
31 | 31 | ||
32 | // set window text | 32 | // set window text |
33 | setText(L"GUI Editor"); | 33 | setText(L"GUI Editor"); |
34 | 34 | ||
35 | // return if we have no skin. | 35 | // return if we have no skin. |
36 | IGUISkin *skin = environment->getSkin(); | 36 | IGUISkin *skin = environment->getSkin(); |
37 | if (!skin) | 37 | if (!skin) |
38 | return; | 38 | return; |
39 | 39 | ||
40 | s32 th = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); | 40 | s32 th = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); |
41 | 41 | ||
42 | setRelativePosition(core::rect<s32>(50,50,250,500)); | 42 | setRelativePosition(core::rect<s32>(50,50,250,500)); |
43 | setMinSize(core::dimension2du(200,200)); | 43 | setMinSize(core::dimension2du(200,200)); |
44 | 44 | ||
45 | IGUITabControl *TabControl = environment->addTabControl(core::rect<s32>(1,th+5,199,449), this, false, true); | 45 | IGUITabControl *TabControl = environment->addTabControl(core::rect<s32>(1,th+5,199,449), this, false, true); |
46 | TabControl->setSubElement(true); | 46 | TabControl->setSubElement(true); |
47 | TabControl->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 47 | TabControl->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
48 | 48 | ||
49 | TabControl->addTab(L"Tools"); | 49 | TabControl->addTab(L"Tools"); |
50 | //L"Texture Cache Browser" | 50 | //L"Texture Cache Browser" |
51 | //L"Font Browser" | 51 | //L"Font Browser" |
52 | //L"Font Generator" | 52 | //L"Font Generator" |
53 | //L"Sprite Editor" | 53 | //L"Sprite Editor" |
54 | //Environment->addGUIElement("textureCacheBrowser", this); | 54 | //Environment->addGUIElement("textureCacheBrowser", this); |
55 | 55 | ||
56 | IGUITab* EditorTab = TabControl->addTab(L"Editor"); | 56 | IGUITab* EditorTab = TabControl->addTab(L"Editor"); |
57 | OptionEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EditorTab); | 57 | OptionEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EditorTab); |
58 | OptionEditor->grab(); | 58 | OptionEditor->grab(); |
59 | OptionEditor->setID(EGUIEDCE_OPTION_EDITOR); | 59 | OptionEditor->setID(EGUIEDCE_OPTION_EDITOR); |
60 | OptionEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); | 60 | OptionEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); |
61 | OptionEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 61 | OptionEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
62 | 62 | ||
63 | if (Parent && Parent->getParent() == Environment->getRootGUIElement()) | 63 | if (Parent && Parent->getParent() == Environment->getRootGUIElement()) |
64 | { | 64 | { |
65 | IGUITab* EnvTab = TabControl->addTab(L"Env"); | 65 | IGUITab* EnvTab = TabControl->addTab(L"Env"); |
66 | EnvEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EnvTab); | 66 | EnvEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", EnvTab); |
67 | EnvEditor->grab(); | 67 | EnvEditor->grab(); |
68 | EnvEditor->setID(EGUIEDCE_ENV_EDITOR); | 68 | EnvEditor->setID(EGUIEDCE_ENV_EDITOR); |
69 | EnvEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); | 69 | EnvEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); |
70 | EnvEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 70 | EnvEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
71 | } | 71 | } |
72 | IGUITab* ElementTab = TabControl->addTab(L"Element"); | 72 | IGUITab* ElementTab = TabControl->addTab(L"Element"); |
73 | 73 | ||
74 | AttribEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", ElementTab); | 74 | AttribEditor = (CGUIAttributeEditor*) environment->addGUIElement("attributeEditor", ElementTab); |
75 | AttribEditor->grab(); | 75 | AttribEditor->grab(); |
76 | AttribEditor->setID(EGUIEDCE_ATTRIB_EDITOR); | 76 | AttribEditor->setID(EGUIEDCE_ATTRIB_EDITOR); |
77 | AttribEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); | 77 | AttribEditor->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); |
78 | AttribEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 78 | AttribEditor->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
79 | 79 | ||
80 | IGUITab* TreeTab = TabControl->addTab(L"Tree"); | 80 | IGUITab* TreeTab = TabControl->addTab(L"Tree"); |
81 | TreeView = environment->addTreeView(core::rect<s32>(0,0,0,0), TreeTab); | 81 | TreeView = environment->addTreeView(core::rect<s32>(0,0,0,0), TreeTab); |
82 | TreeView->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); | 82 | TreeView->setRelativePositionProportional(core::rect<f32>(0.0f, 0.0f, 1.0f, 1.0f)); |
83 | TreeView->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 83 | TreeView->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
84 | IGUITreeViewNode* treenode = TreeView->getRoot(); | 84 | IGUITreeViewNode* treenode = TreeView->getRoot(); |
85 | //treenode->addChildFront(L"Elements"); | 85 | //treenode->addChildFront(L"Elements"); |
86 | ResizeButton = environment->addButton(core::rect<s32>(199-th,449-th,199,449), this); | 86 | ResizeButton = environment->addButton(core::rect<s32>(199-th,449-th,199,449), this); |
87 | ResizeButton->setDrawBorder(false); | 87 | ResizeButton->setDrawBorder(false); |
88 | ResizeButton->setEnabled(false); | 88 | ResizeButton->setEnabled(false); |
89 | ResizeButton->setSpriteBank(skin->getSpriteBank()); | 89 | ResizeButton->setSpriteBank(skin->getSpriteBank()); |
90 | ResizeButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); | 90 | ResizeButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); |
91 | ResizeButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); | 91 | ResizeButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_RESIZE), skin->getColor(EGDC_WINDOW_SYMBOL)); |
92 | ResizeButton->grab(); | 92 | ResizeButton->grab(); |
93 | ResizeButton->setSubElement(true); | 93 | ResizeButton->setSubElement(true); |
94 | ResizeButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); | 94 | ResizeButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); |
95 | updateTree(); | 95 | updateTree(); |
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | //! destructor | 99 | //! destructor |
100 | CGUIEditWindow::~CGUIEditWindow() | 100 | CGUIEditWindow::~CGUIEditWindow() |
101 | { | 101 | { |
102 | // drop everything | 102 | // drop everything |
103 | if (AttribEditor) | 103 | if (AttribEditor) |
104 | AttribEditor->drop(); | 104 | AttribEditor->drop(); |
105 | if (EnvEditor) | 105 | if (EnvEditor) |
106 | EnvEditor->drop(); | 106 | EnvEditor->drop(); |
107 | if (OptionEditor) | 107 | if (OptionEditor) |
108 | OptionEditor->drop(); | 108 | OptionEditor->drop(); |
109 | if (ResizeButton) | 109 | if (ResizeButton) |
110 | ResizeButton->drop(); | 110 | ResizeButton->drop(); |
111 | } | 111 | } |
112 | 112 | ||
113 | IGUITreeView* CGUIEditWindow::getTreeView() const | 113 | IGUITreeView* CGUIEditWindow::getTreeView() const |
114 | { | 114 | { |
115 | return TreeView; | 115 | return TreeView; |
116 | } | 116 | } |
117 | CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor() const | 117 | CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor() const |
118 | { | 118 | { |
119 | return EnvEditor; | 119 | return EnvEditor; |
120 | } | 120 | } |
121 | 121 | ||
122 | CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor() const | 122 | CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor() const |
123 | { | 123 | { |
124 | return AttribEditor; | 124 | return AttribEditor; |
125 | } | 125 | } |
126 | 126 | ||
127 | CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const | 127 | CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const |
128 | { | 128 | { |
129 | return OptionEditor; | 129 | return OptionEditor; |
130 | } | 130 | } |
131 | 131 | ||
132 | IGUITreeViewNode* CGUIEditWindow::getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode) | 132 | IGUITreeViewNode* CGUIEditWindow::getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode) |
133 | { | 133 | { |
134 | IGUITreeViewNode* child = searchnode->getFirstChild(); | 134 | IGUITreeViewNode* child = searchnode->getFirstChild(); |
135 | while (child) | 135 | while (child) |
136 | { | 136 | { |
137 | if (((IGUIElement*) child->getData()) == element) | 137 | if (((IGUIElement*) child->getData()) == element) |
138 | return child; | 138 | return child; |
139 | 139 | ||
140 | if (child->hasChildren()) | 140 | if (child->hasChildren()) |
141 | { | 141 | { |
142 | IGUITreeViewNode* foundnode = getTreeNode(element, child); | 142 | IGUITreeViewNode* foundnode = getTreeNode(element, child); |
143 | if (foundnode) | 143 | if (foundnode) |
144 | return foundnode; | 144 | return foundnode; |
145 | } | 145 | } |
146 | child = child->getNextSibling(); | 146 | child = child->getNextSibling(); |
147 | } | 147 | } |
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | ||
151 | void CGUIEditWindow::addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode) | 151 | void CGUIEditWindow::addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode) |
152 | { | 152 | { |
153 | core::stringw name = core::stringw(parentElement->getTypeName()); | 153 | core::stringw name = core::stringw(parentElement->getTypeName()); |
154 | if (parentElement->getID() != -1) | 154 | if (parentElement->getID() != -1) |
155 | name += core::stringw(L" [") + core::stringw(parentElement->getID()) + core::stringw(L"]"); | 155 | name += core::stringw(L" [") + core::stringw(parentElement->getID()) + core::stringw(L"]"); |
156 | 156 | ||
157 | IGUITreeViewNode* newnode = treenode->addChildBack(name.c_str()); | 157 | IGUITreeViewNode* newnode = treenode->addChildBack(name.c_str()); |
158 | newnode->setData((void*)parentElement); | 158 | newnode->setData((void*)parentElement); |
159 | core::list<IGUIElement*> children = parentElement->getChildren(); | 159 | core::list<IGUIElement*> children = parentElement->getChildren(); |
160 | 160 | ||
161 | for (core::list<IGUIElement*>::Iterator i = children.begin(); i != children.end(); i++ ) | 161 | for (core::list<IGUIElement*>::Iterator i = children.begin(); i != children.end(); i++ ) |
162 | { | 162 | { |
163 | if(core::stringc((*i)->getTypeName()) != "GUIEditor" && !(*i)->isSubElement()) | 163 | if(core::stringc((*i)->getTypeName()) != "GUIEditor" && !(*i)->isSubElement()) |
164 | addChildrenToTree(*i, newnode); | 164 | addChildrenToTree(*i, newnode); |
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
168 | void CGUIEditWindow::updateTree() | 168 | void CGUIEditWindow::updateTree() |
169 | { | 169 | { |
170 | TreeView->getRoot()->clearChildren(); | 170 | TreeView->getRoot()->clearChildren(); |
171 | IGUIElement* root = Environment->getRootGUIElement(); | 171 | IGUIElement* root = Environment->getRootGUIElement(); |
172 | addChildrenToTree(root, TreeView->getRoot()); | 172 | addChildrenToTree(root, TreeView->getRoot()); |
173 | TreeView->getRoot()->getFirstChild()->setExpanded(true); | 173 | TreeView->getRoot()->getFirstChild()->setExpanded(true); |
174 | } | 174 | } |
175 | 175 | ||
176 | void CGUIEditWindow::setSelectedElement(IGUIElement *sel) | 176 | void CGUIEditWindow::setSelectedElement(IGUIElement *sel) |
177 | { | 177 | { |
178 | // save changes | 178 | // save changes |
179 | AttribEditor->updateAttribs(); | 179 | AttribEditor->updateAttribs(); |
180 | IGUITreeViewNode* elementTreeNode = getTreeNode(sel, TreeView->getRoot()); | 180 | IGUITreeViewNode* elementTreeNode = getTreeNode(sel, TreeView->getRoot()); |
181 | 181 | ||
182 | if (elementTreeNode) | 182 | if (elementTreeNode) |
183 | { | 183 | { |
184 | elementTreeNode->setSelected(true); | 184 | elementTreeNode->setSelected(true); |
185 | while (elementTreeNode) | 185 | while (elementTreeNode) |
186 | { | 186 | { |
187 | elementTreeNode->setExpanded(true); | 187 | elementTreeNode->setExpanded(true); |
188 | elementTreeNode = elementTreeNode->getParent(); | 188 | elementTreeNode = elementTreeNode->getParent(); |
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | io::IAttributes* Attribs = AttribEditor->getAttribs(); | 192 | io::IAttributes* Attribs = AttribEditor->getAttribs(); |
193 | 193 | ||
194 | if (SelectedElement && sel != SelectedElement) | 194 | if (SelectedElement && sel != SelectedElement) |
195 | { | 195 | { |
196 | // deserialize attributes | 196 | // deserialize attributes |
197 | SelectedElement->deserializeAttributes(Attribs); | 197 | SelectedElement->deserializeAttributes(Attribs); |
198 | } | 198 | } |
199 | // clear the attributes list | 199 | // clear the attributes list |
200 | Attribs->clear(); | 200 | Attribs->clear(); |
201 | SelectedElement = sel; | 201 | SelectedElement = sel; |
202 | 202 | ||
203 | // get the new attributes | 203 | // get the new attributes |
204 | if (SelectedElement) | 204 | if (SelectedElement) |
205 | SelectedElement->serializeAttributes(Attribs); | 205 | SelectedElement->serializeAttributes(Attribs); |
206 | 206 | ||
207 | AttribEditor->refreshAttribs(); | 207 | AttribEditor->refreshAttribs(); |
208 | } | 208 | } |
209 | 209 | ||
210 | //! draws the element and its children. | 210 | //! draws the element and its children. |
211 | //! same code as for a window | 211 | //! same code as for a window |
212 | void CGUIEditWindow::draw() | 212 | void CGUIEditWindow::draw() |
213 | { | 213 | { |
214 | if (!IsVisible) | 214 | if (!IsVisible) |
215 | return; | 215 | return; |
216 | 216 | ||
217 | IGUISkin* skin = Environment->getSkin(); | 217 | IGUISkin* skin = Environment->getSkin(); |
218 | 218 | ||
219 | core::rect<s32> rect = AbsoluteRect; | 219 | core::rect<s32> rect = AbsoluteRect; |
220 | 220 | ||
221 | // draw body fast | 221 | // draw body fast |
222 | rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), | 222 | rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), |
223 | AbsoluteRect, &AbsoluteClippingRect); | 223 | AbsoluteRect, &AbsoluteClippingRect); |
224 | 224 | ||
225 | if (Text.size()) | 225 | if (Text.size()) |
226 | { | 226 | { |
227 | rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); | 227 | rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); |
228 | rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); | 228 | rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); |
229 | rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; | 229 | rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; |
230 | 230 | ||
231 | IGUIFont* font = skin->getFont(); | 231 | IGUIFont* font = skin->getFont(); |
232 | if (font) | 232 | if (font) |
233 | font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, &AbsoluteClippingRect); | 233 | font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, &AbsoluteClippingRect); |
234 | } | 234 | } |
235 | 235 | ||
236 | IGUIElement::draw(); | 236 | IGUIElement::draw(); |
237 | } | 237 | } |
238 | 238 | ||
239 | 239 | ||
240 | //! called if an event happened. | 240 | //! called if an event happened. |
241 | bool CGUIEditWindow::OnEvent(const SEvent &event) | 241 | bool CGUIEditWindow::OnEvent(const SEvent &event) |
242 | { | 242 | { |
243 | switch(event.EventType) | 243 | switch(event.EventType) |
244 | { | 244 | { |
245 | case EET_GUI_EVENT: | 245 | case EET_GUI_EVENT: |
246 | switch(event.GUIEvent.EventType) | 246 | switch(event.GUIEvent.EventType) |
247 | { | 247 | { |
248 | case EGET_ELEMENT_FOCUS_LOST: | 248 | case EGET_ELEMENT_FOCUS_LOST: |
249 | if (event.GUIEvent.Caller == this || | 249 | if (event.GUIEvent.Caller == this || |
250 | event.GUIEvent.Caller == ResizeButton) | 250 | event.GUIEvent.Caller == ResizeButton) |
251 | { | 251 | { |
252 | Dragging = false; | 252 | Dragging = false; |
253 | Resizing = false; | 253 | Resizing = false; |
254 | } | 254 | } |
255 | break; | 255 | break; |
256 | default: | 256 | default: |
257 | break; | 257 | break; |
258 | } | 258 | } |
259 | 259 | ||
260 | break; | 260 | break; |
261 | case EET_MOUSE_INPUT_EVENT: | 261 | case EET_MOUSE_INPUT_EVENT: |
262 | switch(event.MouseInput.Event) | 262 | switch(event.MouseInput.Event) |
263 | { | 263 | { |
264 | case EMIE_LMOUSE_PRESSED_DOWN: | 264 | case EMIE_LMOUSE_PRESSED_DOWN: |
265 | { | 265 | { |
266 | DragStart.X = event.MouseInput.X; | 266 | DragStart.X = event.MouseInput.X; |
267 | DragStart.Y = event.MouseInput.Y; | 267 | DragStart.Y = event.MouseInput.Y; |
268 | 268 | ||
269 | IGUIElement* clickedElement = getElementFromPoint(DragStart); | 269 | IGUIElement* clickedElement = getElementFromPoint(DragStart); |
270 | 270 | ||
271 | if (clickedElement == this) | 271 | if (clickedElement == this) |
272 | { | 272 | { |
273 | Dragging = IsDraggable; | 273 | Dragging = IsDraggable; |
274 | //Environment->setFocus(this); | 274 | //Environment->setFocus(this); |
275 | if (Parent) | 275 | if (Parent) |
276 | Parent->bringToFront(this); | 276 | Parent->bringToFront(this); |
277 | return true; | 277 | return true; |
278 | } | 278 | } |
279 | else if (clickedElement == ResizeButton) | 279 | else if (clickedElement == ResizeButton) |
280 | { | 280 | { |
281 | Resizing = true; | 281 | Resizing = true; |
282 | //Environment->setFocus(this); | 282 | //Environment->setFocus(this); |
283 | if (Parent) | 283 | if (Parent) |
284 | Parent->bringToFront(this); | 284 | Parent->bringToFront(this); |
285 | return true; | 285 | return true; |
286 | } | 286 | } |
287 | break; | 287 | break; |
288 | } | 288 | } |
289 | case EMIE_LMOUSE_LEFT_UP: | 289 | case EMIE_LMOUSE_LEFT_UP: |
290 | if (Dragging || Resizing) | 290 | if (Dragging || Resizing) |
291 | { | 291 | { |
292 | Dragging = false; | 292 | Dragging = false; |
293 | Resizing = false; | 293 | Resizing = false; |
294 | return true; | 294 | return true; |
295 | } | 295 | } |
296 | break; | 296 | break; |
297 | case EMIE_MOUSE_MOVED: | 297 | case EMIE_MOUSE_MOVED: |
298 | if (Dragging || Resizing) | 298 | if (Dragging || Resizing) |
299 | { | 299 | { |
300 | // gui window should not be dragged outside of its parent | 300 | // gui window should not be dragged outside of its parent |
301 | if (Parent) | 301 | if (Parent) |
302 | if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || | 302 | if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || |
303 | event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || | 303 | event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || |
304 | event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || | 304 | event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || |
305 | event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) | 305 | event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) |
306 | 306 | ||
307 | return true; | 307 | return true; |
308 | core::position2di diff(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y); | 308 | core::position2di diff(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y); |
309 | if (Dragging) | 309 | if (Dragging) |
310 | { | 310 | { |
311 | move(diff); | 311 | move(diff); |
312 | DragStart.X = event.MouseInput.X; | 312 | DragStart.X = event.MouseInput.X; |
313 | DragStart.Y = event.MouseInput.Y; | 313 | DragStart.Y = event.MouseInput.Y; |
314 | } | 314 | } |
315 | else if (Resizing) | 315 | else if (Resizing) |
316 | { | 316 | { |
317 | core::position2di dp = RelativeRect.LowerRightCorner + diff; | 317 | core::position2di dp = RelativeRect.LowerRightCorner + diff; |
318 | setRelativePosition(core::rect<s32>(RelativeRect.UpperLeftCorner, dp)); | 318 | setRelativePosition(core::rect<s32>(RelativeRect.UpperLeftCorner, dp)); |
319 | DragStart += dp - RelativeRect.LowerRightCorner + diff; | 319 | DragStart += dp - RelativeRect.LowerRightCorner + diff; |
320 | } | 320 | } |
321 | 321 | ||
322 | return true; | 322 | return true; |
323 | } | 323 | } |
324 | break; | 324 | break; |
325 | default: | 325 | default: |
326 | break; | 326 | break; |
327 | } | 327 | } |
328 | default: | 328 | default: |
329 | break; | 329 | break; |
330 | } | 330 | } |
331 | 331 | ||
332 | return Parent ? Parent->OnEvent(event) : false; | 332 | return Parent ? Parent->OnEvent(event) : false; |
333 | } | 333 | } |
334 | 334 | ||
335 | bool CGUIEditWindow::isDraggable() const | 335 | bool CGUIEditWindow::isDraggable() const |
336 | { | 336 | { |
337 | return IsDraggable; | 337 | return IsDraggable; |
338 | } | 338 | } |
339 | 339 | ||
340 | void CGUIEditWindow::setDraggable(bool draggable) | 340 | void CGUIEditWindow::setDraggable(bool draggable) |
341 | { | 341 | { |
342 | IsDraggable = draggable; | 342 | IsDraggable = draggable; |
343 | 343 | ||
344 | if (Dragging && !IsDraggable) | 344 | if (Dragging && !IsDraggable) |
345 | Dragging = false; | 345 | Dragging = false; |
346 | } | 346 | } |
347 | 347 | ||
348 | 348 | ||
349 | // we're supposed to supply these if we're creating an IGUIWindow | 349 | // we're supposed to supply these if we're creating an IGUIWindow |
350 | // but we don't need them so we'll just return null | 350 | // but we don't need them so we'll just return null |
351 | 351 | ||
352 | //! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) | 352 | //! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) |
353 | core::rect<s32> CGUIEditWindow::getClientRect() const {return core::recti();} | 353 | core::rect<s32> CGUIEditWindow::getClientRect() const {return core::recti();} |
354 | IGUIButton* CGUIEditWindow::getCloseButton() const {return 0;} | 354 | IGUIButton* CGUIEditWindow::getCloseButton() const {return 0;} |
355 | IGUIButton* CGUIEditWindow::getMinimizeButton() const {return 0;} | 355 | IGUIButton* CGUIEditWindow::getMinimizeButton() const {return 0;} |
356 | IGUIButton* CGUIEditWindow::getMaximizeButton() const {return 0;} | 356 | IGUIButton* CGUIEditWindow::getMaximizeButton() const {return 0;} |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h index 4b1d72f..07eb28b 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWindow.h | |||
@@ -1,88 +1,88 @@ | |||
1 | #ifndef __C_GUI_EDITOR_H_INCLUDED__ | 1 | #ifndef __C_GUI_EDITOR_H_INCLUDED__ |
2 | #define __C_GUI_EDITOR_H_INCLUDED__ | 2 | #define __C_GUI_EDITOR_H_INCLUDED__ |
3 | 3 | ||
4 | 4 | ||
5 | #include "IGUIWindow.h" | 5 | #include "IGUIWindow.h" |
6 | #include "CGUIAttributeEditor.h" | 6 | #include "CGUIAttributeEditor.h" |
7 | //#include "IGUIStaticText.h" | 7 | //#include "IGUIStaticText.h" |
8 | #include "IGUIButton.h" | 8 | #include "IGUIButton.h" |
9 | #include "IGUITreeView.h" | 9 | #include "IGUITreeView.h" |
10 | #include "irrArray.h" | 10 | #include "irrArray.h" |
11 | #include "IAttributes.h" | 11 | #include "IAttributes.h" |
12 | #include "EGUIEditTypes.h" | 12 | #include "EGUIEditTypes.h" |
13 | 13 | ||
14 | namespace irr | 14 | namespace irr |
15 | { | 15 | { |
16 | namespace gui | 16 | namespace gui |
17 | { | 17 | { |
18 | class CGUIEditWindow : public IGUIWindow | 18 | class CGUIEditWindow : public IGUIWindow |
19 | { | 19 | { |
20 | public: | 20 | public: |
21 | 21 | ||
22 | //! constructor | 22 | //! constructor |
23 | CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent); | 23 | CGUIEditWindow(IGUIEnvironment* environment, core::rect<s32> rectangle, IGUIElement *parent); |
24 | 24 | ||
25 | //! destructor | 25 | //! destructor |
26 | ~CGUIEditWindow(); | 26 | ~CGUIEditWindow(); |
27 | 27 | ||
28 | //! this part draws the window | 28 | //! this part draws the window |
29 | virtual void draw(); | 29 | virtual void draw(); |
30 | //! handles events | 30 | //! handles events |
31 | virtual bool OnEvent(const SEvent &event); | 31 | virtual bool OnEvent(const SEvent &event); |
32 | 32 | ||
33 | //! change selection | 33 | //! change selection |
34 | virtual void setSelectedElement(IGUIElement *sel); | 34 | virtual void setSelectedElement(IGUIElement *sel); |
35 | 35 | ||
36 | //! get draggable | 36 | //! get draggable |
37 | virtual bool isDraggable() const; | 37 | virtual bool isDraggable() const; |
38 | 38 | ||
39 | //! get draggable | 39 | //! get draggable |
40 | virtual void setDraggable(bool draggable); | 40 | virtual void setDraggable(bool draggable); |
41 | 41 | ||
42 | // not used | 42 | // not used |
43 | virtual core::rect<s32> getClientRect() const; | 43 | virtual core::rect<s32> getClientRect() const; |
44 | virtual IGUIButton* getCloseButton() const; | 44 | virtual IGUIButton* getCloseButton() const; |
45 | virtual IGUIButton* getMinimizeButton() const; | 45 | virtual IGUIButton* getMinimizeButton() const; |
46 | virtual IGUIButton* getMaximizeButton() const; | 46 | virtual IGUIButton* getMaximizeButton() const; |
47 | virtual void setDrawBackground(bool draw) { } | 47 | virtual void setDrawBackground(bool draw) { } |
48 | virtual bool getDrawBackground() const { return true; } | 48 | virtual bool getDrawBackground() const { return true; } |
49 | virtual void setDrawTitlebar(bool draw) { } | 49 | virtual void setDrawTitlebar(bool draw) { } |
50 | virtual bool getDrawTitlebar() const { return true; } | 50 | virtual bool getDrawTitlebar() const { return true; } |
51 | 51 | ||
52 | IGUITreeView* getTreeView() const; | 52 | IGUITreeView* getTreeView() const; |
53 | CGUIAttributeEditor* getAttributeEditor() const; | 53 | CGUIAttributeEditor* getAttributeEditor() const; |
54 | CGUIAttributeEditor* getOptionEditor() const; | 54 | CGUIAttributeEditor* getOptionEditor() const; |
55 | CGUIAttributeEditor* getEnvironmentEditor() const; | 55 | CGUIAttributeEditor* getEnvironmentEditor() const; |
56 | 56 | ||
57 | //! Returns the type name of the gui element. | 57 | //! Returns the type name of the gui element. |
58 | virtual const c8* getTypeName() const | 58 | virtual const c8* getTypeName() const |
59 | { | 59 | { |
60 | return GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW]; | 60 | return GUIEditElementTypeNames[EGUIEDIT_GUIEDITWINDOW]; |
61 | } | 61 | } |
62 | 62 | ||
63 | void updateTree(); | 63 | void updateTree(); |
64 | private: | 64 | private: |
65 | 65 | ||
66 | void addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode); | 66 | void addChildrenToTree(IGUIElement* parentElement, IGUITreeViewNode* treenode); |
67 | IGUITreeViewNode* getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode); | 67 | IGUITreeViewNode* getTreeNode(IGUIElement* element, IGUITreeViewNode* searchnode); |
68 | // for dragging the window | 68 | // for dragging the window |
69 | bool Dragging; | 69 | bool Dragging; |
70 | bool IsDraggable; | 70 | bool IsDraggable; |
71 | bool Resizing; | 71 | bool Resizing; |
72 | core::position2d<s32> DragStart; | 72 | core::position2d<s32> DragStart; |
73 | 73 | ||
74 | IGUIElement* SelectedElement; // current selected element | 74 | IGUIElement* SelectedElement; // current selected element |
75 | 75 | ||
76 | CGUIAttributeEditor* AttribEditor; // edits the current attribute | 76 | CGUIAttributeEditor* AttribEditor; // edits the current attribute |
77 | CGUIAttributeEditor* OptionEditor; // edits the options for the window | 77 | CGUIAttributeEditor* OptionEditor; // edits the options for the window |
78 | CGUIAttributeEditor* EnvEditor; // edits attributes for the environment | 78 | CGUIAttributeEditor* EnvEditor; // edits attributes for the environment |
79 | IGUITreeView* TreeView; // tree view of all elements in scene | 79 | IGUITreeView* TreeView; // tree view of all elements in scene |
80 | IGUIButton* ResizeButton; | 80 | IGUIButton* ResizeButton; |
81 | 81 | ||
82 | }; | 82 | }; |
83 | 83 | ||
84 | } // end namespace gui | 84 | } // end namespace gui |
85 | } // end namespace irr | 85 | } // end namespace irr |
86 | 86 | ||
87 | #endif // __C_GUI_EDITOR_H_INCLUDED__ | 87 | #endif // __C_GUI_EDITOR_H_INCLUDED__ |
88 | 88 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp index a45e5d3..7b09136 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.cpp | |||
@@ -1,927 +1,927 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | // Thanks to Midnight for all his testing, bug fixes and patches :) | 5 | // Thanks to Midnight for all his testing, bug fixes and patches :) |
6 | 6 | ||
7 | #include "CGUIEditWorkspace.h" | 7 | #include "CGUIEditWorkspace.h" |
8 | #include "IGUIEnvironment.h" | 8 | #include "IGUIEnvironment.h" |
9 | #include "IVideoDriver.h" | 9 | #include "IVideoDriver.h" |
10 | #include "IOSOperator.h" | 10 | #include "IOSOperator.h" |
11 | #include "IReadFile.h" | 11 | #include "IReadFile.h" |
12 | #include "IFileSystem.h" | 12 | #include "IFileSystem.h" |
13 | #include "IXMLWriter.h" | 13 | #include "IXMLWriter.h" |
14 | #include "IGUISkin.h" | 14 | #include "IGUISkin.h" |
15 | #include "IGUIElementFactory.h" | 15 | #include "IGUIElementFactory.h" |
16 | #include "CGUIEditWindow.h" | 16 | #include "CGUIEditWindow.h" |
17 | #include "IGUIContextMenu.h" | 17 | #include "IGUIContextMenu.h" |
18 | #include "IGUIFileOpenDialog.h" | 18 | #include "IGUIFileOpenDialog.h" |
19 | #include "IGUITreeView.h" | 19 | #include "IGUITreeView.h" |
20 | #include "CGUIAttribute.h" | 20 | #include "CGUIAttribute.h" |
21 | #include "CMemoryReadWriteFile.h" | 21 | #include "CMemoryReadWriteFile.h" |
22 | 22 | ||
23 | namespace irr | 23 | namespace irr |
24 | { | 24 | { |
25 | namespace gui | 25 | namespace gui |
26 | { | 26 | { |
27 | 27 | ||
28 | //! constructor | 28 | //! constructor |
29 | CGUIEditWorkspace::CGUIEditWorkspace(IGUIEnvironment* environment, s32 id, IGUIElement *parent) | 29 | CGUIEditWorkspace::CGUIEditWorkspace(IGUIEnvironment* environment, s32 id, IGUIElement *parent) |
30 | : IGUIElement(EGUIET_ELEMENT, environment, parent ? parent : environment->getRootGUIElement(), id, environment->getRootGUIElement()->getAbsolutePosition()), | 30 | : IGUIElement(EGUIET_ELEMENT, environment, parent ? parent : environment->getRootGUIElement(), id, environment->getRootGUIElement()->getAbsolutePosition()), |
31 | CurrentMode(EGUIEDM_SELECT), MouseOverMode(EGUIEDM_SELECT), | 31 | CurrentMode(EGUIEDM_SELECT), MouseOverMode(EGUIEDM_SELECT), |
32 | GridSize(10,10), MenuCommandStart(0x3D17), DrawGrid(false), UseGrid(true), | 32 | GridSize(10,10), MenuCommandStart(0x3D17), DrawGrid(false), UseGrid(true), |
33 | MouseOverElement(0), SelectedElement(0), EditorWindow(0) | 33 | MouseOverElement(0), SelectedElement(0), EditorWindow(0) |
34 | { | 34 | { |
35 | #ifdef _DEBUG | 35 | #ifdef _DEBUG |
36 | setDebugName("CGUIEditWorkspace"); | 36 | setDebugName("CGUIEditWorkspace"); |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | // this element is never saved. | 39 | // this element is never saved. |
40 | setSubElement(true); | 40 | setSubElement(true); |
41 | 41 | ||
42 | // it resizes to fit a resizing window | 42 | // it resizes to fit a resizing window |
43 | setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 43 | setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
44 | 44 | ||
45 | EditorWindow = (CGUIEditWindow*) Environment->addGUIElement("GUIEditWindow", this); | 45 | EditorWindow = (CGUIEditWindow*) Environment->addGUIElement("GUIEditWindow", this); |
46 | if (EditorWindow) | 46 | if (EditorWindow) |
47 | { | 47 | { |
48 | EditorWindow->grab(); | 48 | EditorWindow->grab(); |
49 | EditorWindow->setSubElement(true); | 49 | EditorWindow->setSubElement(true); |
50 | 50 | ||
51 | Environment->setFocus(EditorWindow); | 51 | Environment->setFocus(EditorWindow); |
52 | serializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); | 52 | serializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); |
53 | EditorWindow->getOptionEditor()->refreshAttribs(); | 53 | EditorWindow->getOptionEditor()->refreshAttribs(); |
54 | 54 | ||
55 | if (EditorWindow->getEnvironmentEditor()) | 55 | if (EditorWindow->getEnvironmentEditor()) |
56 | { | 56 | { |
57 | Environment->serializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); | 57 | Environment->serializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); |
58 | EditorWindow->getEnvironmentEditor()->refreshAttribs(); | 58 | EditorWindow->getEnvironmentEditor()->refreshAttribs(); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | 63 | ||
64 | //! destructor | 64 | //! destructor |
65 | CGUIEditWorkspace::~CGUIEditWorkspace() | 65 | CGUIEditWorkspace::~CGUIEditWorkspace() |
66 | { | 66 | { |
67 | if (EditorWindow) | 67 | if (EditorWindow) |
68 | EditorWindow->drop(); | 68 | EditorWindow->drop(); |
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | void CGUIEditWorkspace::setMenuCommandIDStart(s32 id) | 72 | void CGUIEditWorkspace::setMenuCommandIDStart(s32 id) |
73 | { | 73 | { |
74 | MenuCommandStart = id; | 74 | MenuCommandStart = id; |
75 | } | 75 | } |
76 | 76 | ||
77 | CGUIEditWorkspace::EGUIEDIT_MODE CGUIEditWorkspace::getModeFromPos(core::position2di p) | 77 | CGUIEditWorkspace::EGUIEDIT_MODE CGUIEditWorkspace::getModeFromPos(core::position2di p) |
78 | { | 78 | { |
79 | if (SelectedElement) | 79 | if (SelectedElement) |
80 | { | 80 | { |
81 | core::rect<s32> r = SelectedElement->getAbsolutePosition(); | 81 | core::rect<s32> r = SelectedElement->getAbsolutePosition(); |
82 | 82 | ||
83 | if (TLRect.isPointInside(p)) | 83 | if (TLRect.isPointInside(p)) |
84 | return EGUIEDM_RESIZE_TL; | 84 | return EGUIEDM_RESIZE_TL; |
85 | 85 | ||
86 | else if (TRRect.isPointInside(p)) | 86 | else if (TRRect.isPointInside(p)) |
87 | return EGUIEDM_RESIZE_TR; | 87 | return EGUIEDM_RESIZE_TR; |
88 | 88 | ||
89 | else if (BLRect.isPointInside(p) ) | 89 | else if (BLRect.isPointInside(p) ) |
90 | return EGUIEDM_RESIZE_BL; | 90 | return EGUIEDM_RESIZE_BL; |
91 | 91 | ||
92 | else if (BRRect.isPointInside(p)) | 92 | else if (BRRect.isPointInside(p)) |
93 | return EGUIEDM_RESIZE_BR; | 93 | return EGUIEDM_RESIZE_BR; |
94 | 94 | ||
95 | else if (TopRect.isPointInside(p)) | 95 | else if (TopRect.isPointInside(p)) |
96 | return EGUIEDM_RESIZE_T; | 96 | return EGUIEDM_RESIZE_T; |
97 | 97 | ||
98 | else if (BRect.isPointInside(p)) | 98 | else if (BRect.isPointInside(p)) |
99 | return EGUIEDM_RESIZE_B; | 99 | return EGUIEDM_RESIZE_B; |
100 | 100 | ||
101 | else if (LRect.isPointInside(p)) | 101 | else if (LRect.isPointInside(p)) |
102 | return EGUIEDM_RESIZE_L; | 102 | return EGUIEDM_RESIZE_L; |
103 | 103 | ||
104 | else if (RRect.isPointInside(p)) | 104 | else if (RRect.isPointInside(p)) |
105 | return EGUIEDM_RESIZE_R; | 105 | return EGUIEDM_RESIZE_R; |
106 | 106 | ||
107 | else if (getEditableElementFromPoint(SelectedElement, p) == SelectedElement) | 107 | else if (getEditableElementFromPoint(SelectedElement, p) == SelectedElement) |
108 | return EGUIEDM_MOVE; | 108 | return EGUIEDM_MOVE; |
109 | 109 | ||
110 | else | 110 | else |
111 | return EGUIEDM_SELECT; | 111 | return EGUIEDM_SELECT; |
112 | } | 112 | } |
113 | 113 | ||
114 | return EGUIEDM_SELECT; | 114 | return EGUIEDM_SELECT; |
115 | 115 | ||
116 | } | 116 | } |
117 | 117 | ||
118 | IGUIElement* CGUIEditWorkspace::getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index ) | 118 | IGUIElement* CGUIEditWorkspace::getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index ) |
119 | { | 119 | { |
120 | IGUIElement* target = 0; | 120 | IGUIElement* target = 0; |
121 | 121 | ||
122 | // we have to search from back to front. | 122 | // we have to search from back to front. |
123 | 123 | ||
124 | core::list<IGUIElement*>::ConstIterator it = start->getChildren().getLast(); | 124 | core::list<IGUIElement*>::ConstIterator it = start->getChildren().getLast(); |
125 | s32 count=0; | 125 | s32 count=0; |
126 | while(it != start->getChildren().end()) | 126 | while(it != start->getChildren().end()) |
127 | { | 127 | { |
128 | target = getEditableElementFromPoint((*it),point); | 128 | target = getEditableElementFromPoint((*it),point); |
129 | if (target) | 129 | if (target) |
130 | { | 130 | { |
131 | if (!target->isSubElement() && !isMyChild(target) && target != this) | 131 | if (!target->isSubElement() && !isMyChild(target) && target != this) |
132 | { | 132 | { |
133 | if (index == count) | 133 | if (index == count) |
134 | return target; | 134 | return target; |
135 | else | 135 | else |
136 | count++; | 136 | count++; |
137 | } | 137 | } |
138 | else | 138 | else |
139 | target = 0; | 139 | target = 0; |
140 | } | 140 | } |
141 | --it; | 141 | --it; |
142 | } | 142 | } |
143 | 143 | ||
144 | if (start->getAbsolutePosition().isPointInside(point)) | 144 | if (start->getAbsolutePosition().isPointInside(point)) |
145 | target = start; | 145 | target = start; |
146 | 146 | ||
147 | return target; | 147 | return target; |
148 | } | 148 | } |
149 | 149 | ||
150 | void CGUIEditWorkspace::setSelectedElement(IGUIElement *sel) | 150 | void CGUIEditWorkspace::setSelectedElement(IGUIElement *sel) |
151 | { | 151 | { |
152 | IGUIElement* focus = Environment->getFocus(); | 152 | IGUIElement* focus = Environment->getFocus(); |
153 | // we only give focus back to children | 153 | // we only give focus back to children |
154 | if (!isMyChild(focus)) | 154 | if (!isMyChild(focus)) |
155 | focus = 0; | 155 | focus = 0; |
156 | 156 | ||
157 | if (SelectedElement != Parent) | 157 | if (SelectedElement != Parent) |
158 | { | 158 | { |
159 | if (SelectedElement != sel && EditorWindow) | 159 | if (SelectedElement != sel && EditorWindow) |
160 | { | 160 | { |
161 | EditorWindow->setSelectedElement(sel); | 161 | EditorWindow->setSelectedElement(sel); |
162 | SelectedElement = sel; | 162 | SelectedElement = sel; |
163 | } | 163 | } |
164 | } | 164 | } |
165 | else | 165 | else |
166 | SelectedElement = 0; | 166 | SelectedElement = 0; |
167 | 167 | ||
168 | if (focus) | 168 | if (focus) |
169 | Environment->setFocus(focus); | 169 | Environment->setFocus(focus); |
170 | else | 170 | else |
171 | Environment->setFocus(this); | 171 | Environment->setFocus(this); |
172 | } | 172 | } |
173 | 173 | ||
174 | IGUIElement* CGUIEditWorkspace::getSelectedElement() | 174 | IGUIElement* CGUIEditWorkspace::getSelectedElement() |
175 | { | 175 | { |
176 | return SelectedElement; | 176 | return SelectedElement; |
177 | } | 177 | } |
178 | void CGUIEditWorkspace::selectNextSibling() | 178 | void CGUIEditWorkspace::selectNextSibling() |
179 | { | 179 | { |
180 | IGUIElement* p=0; | 180 | IGUIElement* p=0; |
181 | 181 | ||
182 | if (SelectedElement && SelectedElement->getParent()) | 182 | if (SelectedElement && SelectedElement->getParent()) |
183 | p = SelectedElement->getParent(); | 183 | p = SelectedElement->getParent(); |
184 | else | 184 | else |
185 | p = Parent; | 185 | p = Parent; |
186 | 186 | ||
187 | core::list<IGUIElement*>::ConstIterator it = p->getChildren().begin(); | 187 | core::list<IGUIElement*>::ConstIterator it = p->getChildren().begin(); |
188 | // find selected element | 188 | // find selected element |
189 | if (SelectedElement) | 189 | if (SelectedElement) |
190 | while (*it != SelectedElement) | 190 | while (*it != SelectedElement) |
191 | ++it; | 191 | ++it; |
192 | if (it !=p->getChildren().end()) | 192 | if (it !=p->getChildren().end()) |
193 | ++it; | 193 | ++it; |
194 | // find next non sub-element | 194 | // find next non sub-element |
195 | while (it != p->getChildren().end() && (*it)->isSubElement()) | 195 | while (it != p->getChildren().end() && (*it)->isSubElement()) |
196 | ++it; | 196 | ++it; |
197 | 197 | ||
198 | if (it != p->getChildren().end()) | 198 | if (it != p->getChildren().end()) |
199 | setSelectedElement(*it); | 199 | setSelectedElement(*it); |
200 | } | 200 | } |
201 | void CGUIEditWorkspace::selectPreviousSibling() | 201 | void CGUIEditWorkspace::selectPreviousSibling() |
202 | { | 202 | { |
203 | IGUIElement* p=0; | 203 | IGUIElement* p=0; |
204 | 204 | ||
205 | if (SelectedElement && SelectedElement->getParent()) | 205 | if (SelectedElement && SelectedElement->getParent()) |
206 | p = SelectedElement->getParent(); | 206 | p = SelectedElement->getParent(); |
207 | else | 207 | else |
208 | p = Parent; | 208 | p = Parent; |
209 | 209 | ||
210 | core::list<IGUIElement*>::ConstIterator it = p->getChildren().getLast(); | 210 | core::list<IGUIElement*>::ConstIterator it = p->getChildren().getLast(); |
211 | // find selected element | 211 | // find selected element |
212 | if (SelectedElement) | 212 | if (SelectedElement) |
213 | while (*it != SelectedElement) | 213 | while (*it != SelectedElement) |
214 | --it; | 214 | --it; |
215 | if (it != p->getChildren().end()) | 215 | if (it != p->getChildren().end()) |
216 | --it; | 216 | --it; |
217 | // find next non sub-element | 217 | // find next non sub-element |
218 | while (it != p->getChildren().end() && (*it)->isSubElement()) | 218 | while (it != p->getChildren().end() && (*it)->isSubElement()) |
219 | --it; | 219 | --it; |
220 | 220 | ||
221 | if (it != p->getChildren().end()) | 221 | if (it != p->getChildren().end()) |
222 | setSelectedElement(*it); | 222 | setSelectedElement(*it); |
223 | } | 223 | } |
224 | 224 | ||
225 | //! called if an event happened. | 225 | //! called if an event happened. |
226 | bool CGUIEditWorkspace::OnEvent(const SEvent &e) | 226 | bool CGUIEditWorkspace::OnEvent(const SEvent &e) |
227 | { | 227 | { |
228 | IGUIFileOpenDialog* dialog=0; | 228 | IGUIFileOpenDialog* dialog=0; |
229 | switch(e.EventType) | 229 | switch(e.EventType) |
230 | { | 230 | { |
231 | case ATTRIBEDIT_ATTRIB_CHANGED: | 231 | case ATTRIBEDIT_ATTRIB_CHANGED: |
232 | { | 232 | { |
233 | switch (e.UserEvent.UserData1) | 233 | switch (e.UserEvent.UserData1) |
234 | { | 234 | { |
235 | case EGUIEDCE_ATTRIB_EDITOR: | 235 | case EGUIEDCE_ATTRIB_EDITOR: |
236 | { | 236 | { |
237 | // update selected items attributes | 237 | // update selected items attributes |
238 | if (SelectedElement) | 238 | if (SelectedElement) |
239 | { | 239 | { |
240 | SelectedElement->deserializeAttributes(EditorWindow->getAttributeEditor()->getAttribs()); | 240 | SelectedElement->deserializeAttributes(EditorWindow->getAttributeEditor()->getAttribs()); |
241 | EditorWindow->updateTree(); | 241 | EditorWindow->updateTree(); |
242 | } | 242 | } |
243 | return true; | 243 | return true; |
244 | } | 244 | } |
245 | case EGUIEDCE_OPTION_EDITOR: | 245 | case EGUIEDCE_OPTION_EDITOR: |
246 | { | 246 | { |
247 | // update editor options | 247 | // update editor options |
248 | deserializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); | 248 | deserializeAttributes(EditorWindow->getOptionEditor()->getAttribs()); |
249 | return true; | 249 | return true; |
250 | } | 250 | } |
251 | case EGUIEDCE_ENV_EDITOR: | 251 | case EGUIEDCE_ENV_EDITOR: |
252 | { | 252 | { |
253 | // update environment | 253 | // update environment |
254 | Environment->deserializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); | 254 | Environment->deserializeAttributes(EditorWindow->getEnvironmentEditor()->getAttribs()); |
255 | return true; | 255 | return true; |
256 | } | 256 | } |
257 | } | 257 | } |
258 | } | 258 | } |
259 | break; | 259 | break; |
260 | 260 | ||
261 | case EET_KEY_INPUT_EVENT: | 261 | case EET_KEY_INPUT_EVENT: |
262 | if (!e.KeyInput.PressedDown) | 262 | if (!e.KeyInput.PressedDown) |
263 | { | 263 | { |
264 | switch (e.KeyInput.Key) | 264 | switch (e.KeyInput.Key) |
265 | { | 265 | { |
266 | case KEY_DELETE: | 266 | case KEY_DELETE: |
267 | if (SelectedElement) | 267 | if (SelectedElement) |
268 | { | 268 | { |
269 | IGUIElement* el = SelectedElement; | 269 | IGUIElement* el = SelectedElement; |
270 | setSelectedElement(0); | 270 | setSelectedElement(0); |
271 | MouseOverElement = 0; | 271 | MouseOverElement = 0; |
272 | el->remove(); | 272 | el->remove(); |
273 | EditorWindow->updateTree(); | 273 | EditorWindow->updateTree(); |
274 | } | 274 | } |
275 | break; | 275 | break; |
276 | case KEY_KEY_X: | 276 | case KEY_KEY_X: |
277 | if (e.KeyInput.Control && SelectedElement) | 277 | if (e.KeyInput.Control && SelectedElement) |
278 | { | 278 | { |
279 | // cut | 279 | // cut |
280 | CopySelectedElementXML(); | 280 | CopySelectedElementXML(); |
281 | // delete element | 281 | // delete element |
282 | IGUIElement *el = SelectedElement; | 282 | IGUIElement *el = SelectedElement; |
283 | setSelectedElement(0); | 283 | setSelectedElement(0); |
284 | MouseOverElement = 0; | 284 | MouseOverElement = 0; |
285 | el->remove(); | 285 | el->remove(); |
286 | } | 286 | } |
287 | break; | 287 | break; |
288 | case KEY_KEY_C: | 288 | case KEY_KEY_C: |
289 | // copy | 289 | // copy |
290 | if (e.KeyInput.Control && SelectedElement) | 290 | if (e.KeyInput.Control && SelectedElement) |
291 | { | 291 | { |
292 | CopySelectedElementXML(); | 292 | CopySelectedElementXML(); |
293 | } | 293 | } |
294 | break; | 294 | break; |
295 | case KEY_KEY_V: | 295 | case KEY_KEY_V: |
296 | // paste | 296 | // paste |
297 | if (e.KeyInput.Control) | 297 | if (e.KeyInput.Control) |
298 | { | 298 | { |
299 | PasteXMLToSelectedElement(); | 299 | PasteXMLToSelectedElement(); |
300 | } | 300 | } |
301 | break; | 301 | break; |
302 | default: | 302 | default: |
303 | break; | 303 | break; |
304 | } | 304 | } |
305 | 305 | ||
306 | return true; | 306 | return true; |
307 | } | 307 | } |
308 | break; | 308 | break; |
309 | 309 | ||
310 | case EET_MOUSE_INPUT_EVENT: | 310 | case EET_MOUSE_INPUT_EVENT: |
311 | 311 | ||
312 | switch(e.MouseInput.Event) | 312 | switch(e.MouseInput.Event) |
313 | { | 313 | { |
314 | case EMIE_MOUSE_WHEEL: | 314 | case EMIE_MOUSE_WHEEL: |
315 | { | 315 | { |
316 | f32 wheel = e.MouseInput.Wheel; | 316 | f32 wheel = e.MouseInput.Wheel; |
317 | 317 | ||
318 | if (wheel > 0) | 318 | if (wheel > 0) |
319 | selectPreviousSibling(); | 319 | selectPreviousSibling(); |
320 | else | 320 | else |
321 | selectNextSibling(); | 321 | selectNextSibling(); |
322 | } | 322 | } |
323 | break; | 323 | break; |
324 | case EMIE_LMOUSE_PRESSED_DOWN: | 324 | case EMIE_LMOUSE_PRESSED_DOWN: |
325 | { | 325 | { |
326 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); | 326 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); |
327 | 327 | ||
328 | IGUIElement* newSelection = getElementFromPoint(p); | 328 | IGUIElement* newSelection = getElementFromPoint(p); |
329 | 329 | ||
330 | if (newSelection != this && isMyChild(newSelection) ) // redirect event | 330 | if (newSelection != this && isMyChild(newSelection) ) // redirect event |
331 | { | 331 | { |
332 | Environment->setFocus(newSelection); | 332 | Environment->setFocus(newSelection); |
333 | return true; | 333 | return true; |
334 | } | 334 | } |
335 | 335 | ||
336 | // hide the gui editor | 336 | // hide the gui editor |
337 | if (EditorWindow) | 337 | if (EditorWindow) |
338 | EditorWindow->setVisible(false); | 338 | EditorWindow->setVisible(false); |
339 | 339 | ||
340 | if (CurrentMode == EGUIEDM_SELECT) | 340 | if (CurrentMode == EGUIEDM_SELECT) |
341 | { | 341 | { |
342 | if (SelectedElement) | 342 | if (SelectedElement) |
343 | { | 343 | { |
344 | // start moving or dragging | 344 | // start moving or dragging |
345 | CurrentMode = getModeFromPos(p); | 345 | CurrentMode = getModeFromPos(p); |
346 | 346 | ||
347 | if (CurrentMode == EGUIEDM_MOVE) | 347 | if (CurrentMode == EGUIEDM_MOVE) |
348 | StartMovePos = SelectedElement->getAbsolutePosition().UpperLeftCorner; | 348 | StartMovePos = SelectedElement->getAbsolutePosition().UpperLeftCorner; |
349 | 349 | ||
350 | DragStart = p; | 350 | DragStart = p; |
351 | SelectedArea = SelectedElement->getAbsolutePosition(); | 351 | SelectedArea = SelectedElement->getAbsolutePosition(); |
352 | } | 352 | } |
353 | 353 | ||
354 | if (CurrentMode < EGUIEDM_MOVE) | 354 | if (CurrentMode < EGUIEDM_MOVE) |
355 | { | 355 | { |
356 | // selecting an element... | 356 | // selecting an element... |
357 | MouseOverElement = getEditableElementFromPoint(Parent, p); | 357 | MouseOverElement = getEditableElementFromPoint(Parent, p); |
358 | 358 | ||
359 | if (MouseOverElement == Parent) | 359 | if (MouseOverElement == Parent) |
360 | MouseOverElement = 0; | 360 | MouseOverElement = 0; |
361 | 361 | ||
362 | setSelectedElement(MouseOverElement); | 362 | setSelectedElement(MouseOverElement); |
363 | } | 363 | } |
364 | } | 364 | } |
365 | 365 | ||
366 | break; | 366 | break; |
367 | } | 367 | } |
368 | case EMIE_RMOUSE_PRESSED_DOWN: | 368 | case EMIE_RMOUSE_PRESSED_DOWN: |
369 | if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT || CurrentMode >= EGUIEDM_MOVE) | 369 | if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT || CurrentMode >= EGUIEDM_MOVE) |
370 | { | 370 | { |
371 | // cancel dragging | 371 | // cancel dragging |
372 | CurrentMode = EGUIEDM_SELECT; | 372 | CurrentMode = EGUIEDM_SELECT; |
373 | } | 373 | } |
374 | else | 374 | else |
375 | { | 375 | { |
376 | DragStart = core::position2di(e.MouseInput.X,e.MouseInput.Y); | 376 | DragStart = core::position2di(e.MouseInput.X,e.MouseInput.Y); |
377 | // root menu | 377 | // root menu |
378 | IGUIContextMenu* mnu = Environment->addContextMenu( | 378 | IGUIContextMenu* mnu = Environment->addContextMenu( |
379 | core::rect<s32>(e.MouseInput.X, e.MouseInput.Y, e.MouseInput.Y+100, e.MouseInput.Y+100),this); | 379 | core::rect<s32>(e.MouseInput.X, e.MouseInput.Y, e.MouseInput.Y+100, e.MouseInput.Y+100),this); |
380 | mnu->addItem(L"File",-1,true,true); | 380 | mnu->addItem(L"File",-1,true,true); |
381 | mnu->addItem(L"Edit",-1,true,true); | 381 | mnu->addItem(L"Edit",-1,true,true); |
382 | mnu->addItem(L"View",-1,true,true); | 382 | mnu->addItem(L"View",-1,true,true); |
383 | mnu->addItem(SelectedElement ? L"Add child" : L"Add" ,-1,true,true); | 383 | mnu->addItem(SelectedElement ? L"Add child" : L"Add" ,-1,true,true); |
384 | 384 | ||
385 | // file menu | 385 | // file menu |
386 | IGUIContextMenu* sub = mnu->getSubMenu(0); | 386 | IGUIContextMenu* sub = mnu->getSubMenu(0); |
387 | IGUIContextMenu* sub2 =0; | 387 | IGUIContextMenu* sub2 =0; |
388 | 388 | ||
389 | sub->addItem(L"New", MenuCommandStart + EGUIEDMC_FILE_NEW ); | 389 | sub->addItem(L"New", MenuCommandStart + EGUIEDMC_FILE_NEW ); |
390 | sub->addItem(L"Load...",MenuCommandStart + EGUIEDMC_FILE_LOAD); | 390 | sub->addItem(L"Load...",MenuCommandStart + EGUIEDMC_FILE_LOAD); |
391 | sub->addItem(L"Save...",MenuCommandStart + EGUIEDMC_FILE_SAVE); | 391 | sub->addItem(L"Save...",MenuCommandStart + EGUIEDMC_FILE_SAVE); |
392 | 392 | ||
393 | // edit menu | 393 | // edit menu |
394 | sub = mnu->getSubMenu(1); | 394 | sub = mnu->getSubMenu(1); |
395 | sub->addItem(L"Cut (ctrl+x)", MenuCommandStart + EGUIEDMC_CUT_ELEMENT, (SelectedElement != 0)); | 395 | sub->addItem(L"Cut (ctrl+x)", MenuCommandStart + EGUIEDMC_CUT_ELEMENT, (SelectedElement != 0)); |
396 | sub->addItem(L"Copy (ctrl+c)", MenuCommandStart + EGUIEDMC_COPY_ELEMENT, (SelectedElement != 0)); | 396 | sub->addItem(L"Copy (ctrl+c)", MenuCommandStart + EGUIEDMC_COPY_ELEMENT, (SelectedElement != 0)); |
397 | sub->addItem(L"Paste (ctrl+v)", MenuCommandStart + EGUIEDMC_PASTE_ELEMENT, | 397 | sub->addItem(L"Paste (ctrl+v)", MenuCommandStart + EGUIEDMC_PASTE_ELEMENT, |
398 | (core::stringc(Environment->getOSOperator()->getTextFromClipboard()) != "")); | 398 | (core::stringc(Environment->getOSOperator()->getTextFromClipboard()) != "")); |
399 | sub->addItem(L"Delete (del)", MenuCommandStart + EGUIEDMC_DELETE_ELEMENT, (SelectedElement != 0)); | 399 | sub->addItem(L"Delete (del)", MenuCommandStart + EGUIEDMC_DELETE_ELEMENT, (SelectedElement != 0)); |
400 | sub->addSeparator(); | 400 | sub->addSeparator(); |
401 | sub->addItem(L"Set parent", MenuCommandStart + EGUIEDMC_SET_PARENT, (SelectedElement != 0)); | 401 | sub->addItem(L"Set parent", MenuCommandStart + EGUIEDMC_SET_PARENT, (SelectedElement != 0)); |
402 | sub->addItem(L"Bring to front", MenuCommandStart + EGUIEDMC_BRING_TO_FRONT, (SelectedElement != 0)); | 402 | sub->addItem(L"Bring to front", MenuCommandStart + EGUIEDMC_BRING_TO_FRONT, (SelectedElement != 0)); |
403 | sub->addSeparator(); | 403 | sub->addSeparator(); |
404 | sub->addItem(L"Save to XML...", MenuCommandStart + EGUIEDMC_SAVE_ELEMENT, (SelectedElement != 0)); | 404 | sub->addItem(L"Save to XML...", MenuCommandStart + EGUIEDMC_SAVE_ELEMENT, (SelectedElement != 0)); |
405 | 405 | ||
406 | sub = mnu->getSubMenu(2); | 406 | sub = mnu->getSubMenu(2); |
407 | // view menu | 407 | // view menu |
408 | if (EditorWindow) | 408 | if (EditorWindow) |
409 | sub->addItem(EditorWindow->isVisible() ? L"Hide window" : L"Show window", MenuCommandStart + EGUIEDMC_TOGGLE_EDITOR); | 409 | sub->addItem(EditorWindow->isVisible() ? L"Hide window" : L"Show window", MenuCommandStart + EGUIEDMC_TOGGLE_EDITOR); |
410 | 410 | ||
411 | sub = mnu->getSubMenu(3); | 411 | sub = mnu->getSubMenu(3); |
412 | 412 | ||
413 | s32 i,j,c=0; | 413 | s32 i,j,c=0; |
414 | sub->addItem(L"Default factory",-1,true, true); | 414 | sub->addItem(L"Default factory",-1,true, true); |
415 | 415 | ||
416 | // add elements from each factory | 416 | // add elements from each factory |
417 | for (i=0; u32(i) < Environment->getRegisteredGUIElementFactoryCount(); ++i) | 417 | for (i=0; u32(i) < Environment->getRegisteredGUIElementFactoryCount(); ++i) |
418 | { | 418 | { |
419 | sub2 = sub->getSubMenu(i); | 419 | sub2 = sub->getSubMenu(i); |
420 | 420 | ||
421 | IGUIElementFactory *f = Environment->getGUIElementFactory(i); | 421 | IGUIElementFactory *f = Environment->getGUIElementFactory(i); |
422 | 422 | ||
423 | for (j=0; j< f->getCreatableGUIElementTypeCount(); ++j) | 423 | for (j=0; j< f->getCreatableGUIElementTypeCount(); ++j) |
424 | { | 424 | { |
425 | sub2->addItem(core::stringw(f->getCreateableGUIElementTypeName(j)).c_str(), MenuCommandStart + EGUIEDMC_COUNT + c); | 425 | sub2->addItem(core::stringw(f->getCreateableGUIElementTypeName(j)).c_str(), MenuCommandStart + EGUIEDMC_COUNT + c); |
426 | c++; | 426 | c++; |
427 | } | 427 | } |
428 | 428 | ||
429 | if (u32(i+1) < Environment->getRegisteredGUIElementFactoryCount()) | 429 | if (u32(i+1) < Environment->getRegisteredGUIElementFactoryCount()) |
430 | { | 430 | { |
431 | core::stringw strFact; | 431 | core::stringw strFact; |
432 | strFact = L"Factory "; | 432 | strFact = L"Factory "; |
433 | strFact += i+1; | 433 | strFact += i+1; |
434 | sub->addItem(strFact.c_str(),-1, true, true); | 434 | sub->addItem(strFact.c_str(),-1, true, true); |
435 | } | 435 | } |
436 | } | 436 | } |
437 | sub->addSeparator(); | 437 | sub->addSeparator(); |
438 | sub->addItem(L"From XML...", MenuCommandStart + EGUIEDMC_INSERT_XML); | 438 | sub->addItem(L"From XML...", MenuCommandStart + EGUIEDMC_INSERT_XML); |
439 | 439 | ||
440 | // set focus to menu | 440 | // set focus to menu |
441 | Environment->setFocus(mnu); | 441 | Environment->setFocus(mnu); |
442 | 442 | ||
443 | } | 443 | } |
444 | break; | 444 | break; |
445 | case EMIE_LMOUSE_LEFT_UP: | 445 | case EMIE_LMOUSE_LEFT_UP: |
446 | 446 | ||
447 | // make window visible again | 447 | // make window visible again |
448 | if (EditorWindow) | 448 | if (EditorWindow) |
449 | EditorWindow->setVisible(true); | 449 | EditorWindow->setVisible(true); |
450 | if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT) | 450 | if (CurrentMode == EGUIEDM_SELECT_NEW_PARENT) |
451 | { | 451 | { |
452 | if (SelectedElement) | 452 | if (SelectedElement) |
453 | { | 453 | { |
454 | MouseOverElement = getEditableElementFromPoint(Parent, | 454 | MouseOverElement = getEditableElementFromPoint(Parent, |
455 | core::position2di(e.MouseInput.X,e.MouseInput.Y)); | 455 | core::position2di(e.MouseInput.X,e.MouseInput.Y)); |
456 | if (MouseOverElement) | 456 | if (MouseOverElement) |
457 | { | 457 | { |
458 | MouseOverElement->addChild(SelectedElement); | 458 | MouseOverElement->addChild(SelectedElement); |
459 | setSelectedElement(0); | 459 | setSelectedElement(0); |
460 | setSelectedElement(SelectedElement); | 460 | setSelectedElement(SelectedElement); |
461 | } | 461 | } |
462 | } | 462 | } |
463 | CurrentMode = EGUIEDM_SELECT; | 463 | CurrentMode = EGUIEDM_SELECT; |
464 | } | 464 | } |
465 | else if (CurrentMode >= EGUIEDM_MOVE) | 465 | else if (CurrentMode >= EGUIEDM_MOVE) |
466 | { | 466 | { |
467 | IGUIElement *sel = SelectedElement; | 467 | IGUIElement *sel = SelectedElement; |
468 | // unselect | 468 | // unselect |
469 | setSelectedElement(0); | 469 | setSelectedElement(0); |
470 | 470 | ||
471 | // move | 471 | // move |
472 | core::position2d<s32> p(0,0); | 472 | core::position2d<s32> p(0,0); |
473 | if (sel->getParent()) | 473 | if (sel->getParent()) |
474 | p = sel->getParent()->getAbsolutePosition().UpperLeftCorner; | 474 | p = sel->getParent()->getAbsolutePosition().UpperLeftCorner; |
475 | 475 | ||
476 | sel->setRelativePosition(SelectedArea - p); | 476 | sel->setRelativePosition(SelectedArea - p); |
477 | 477 | ||
478 | // select | 478 | // select |
479 | setSelectedElement(sel); | 479 | setSelectedElement(sel); |
480 | 480 | ||
481 | // reset selection mode... | 481 | // reset selection mode... |
482 | CurrentMode = EGUIEDM_SELECT; | 482 | CurrentMode = EGUIEDM_SELECT; |
483 | } | 483 | } |
484 | break; | 484 | break; |
485 | case EMIE_MOUSE_MOVED: | 485 | case EMIE_MOUSE_MOVED: |
486 | // always on top | 486 | // always on top |
487 | Parent->bringToFront(this); | 487 | Parent->bringToFront(this); |
488 | 488 | ||
489 | // if selecting | 489 | // if selecting |
490 | if (CurrentMode == EGUIEDM_SELECT || CurrentMode == EGUIEDM_SELECT_NEW_PARENT) | 490 | if (CurrentMode == EGUIEDM_SELECT || CurrentMode == EGUIEDM_SELECT_NEW_PARENT) |
491 | { | 491 | { |
492 | 492 | ||
493 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); | 493 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); |
494 | 494 | ||
495 | // highlight the element that the mouse is over | 495 | // highlight the element that the mouse is over |
496 | MouseOverElement = getEditableElementFromPoint(Parent, p); | 496 | MouseOverElement = getEditableElementFromPoint(Parent, p); |
497 | if (MouseOverElement == Parent) | 497 | if (MouseOverElement == Parent) |
498 | { | 498 | { |
499 | MouseOverElement = 0; | 499 | MouseOverElement = 0; |
500 | } | 500 | } |
501 | 501 | ||
502 | if (CurrentMode == EGUIEDM_SELECT) | 502 | if (CurrentMode == EGUIEDM_SELECT) |
503 | { | 503 | { |
504 | MouseOverMode = getModeFromPos(p); | 504 | MouseOverMode = getModeFromPos(p); |
505 | if (MouseOverMode > EGUIEDM_MOVE) | 505 | if (MouseOverMode > EGUIEDM_MOVE) |
506 | { | 506 | { |
507 | MouseOverElement = SelectedElement; | 507 | MouseOverElement = SelectedElement; |
508 | } | 508 | } |
509 | } | 509 | } |
510 | } | 510 | } |
511 | else if (CurrentMode == EGUIEDM_MOVE) | 511 | else if (CurrentMode == EGUIEDM_MOVE) |
512 | { | 512 | { |
513 | // get difference | 513 | // get difference |
514 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); | 514 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); |
515 | p -= DragStart; | 515 | p -= DragStart; |
516 | 516 | ||
517 | // apply to top corner | 517 | // apply to top corner |
518 | p = StartMovePos + p; | 518 | p = StartMovePos + p; |
519 | if (UseGrid) | 519 | if (UseGrid) |
520 | { | 520 | { |
521 | p.X = (p.X/GridSize.Width)*GridSize.Width; | 521 | p.X = (p.X/GridSize.Width)*GridSize.Width; |
522 | p.Y = (p.Y/GridSize.Height)*GridSize.Height; | 522 | p.Y = (p.Y/GridSize.Height)*GridSize.Height; |
523 | } | 523 | } |
524 | 524 | ||
525 | SelectedArea += p - SelectedArea.UpperLeftCorner; | 525 | SelectedArea += p - SelectedArea.UpperLeftCorner; |
526 | } | 526 | } |
527 | else if (CurrentMode > EGUIEDM_MOVE) | 527 | else if (CurrentMode > EGUIEDM_MOVE) |
528 | { | 528 | { |
529 | // get difference from start position | 529 | // get difference from start position |
530 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); | 530 | core::position2di p = core::position2di(e.MouseInput.X,e.MouseInput.Y); |
531 | if (UseGrid) | 531 | if (UseGrid) |
532 | { | 532 | { |
533 | p.X = (p.X/GridSize.Width)*GridSize.Width; | 533 | p.X = (p.X/GridSize.Width)*GridSize.Width; |
534 | p.Y = (p.Y/GridSize.Height)*GridSize.Height; | 534 | p.Y = (p.Y/GridSize.Height)*GridSize.Height; |
535 | } | 535 | } |
536 | 536 | ||
537 | switch(CurrentMode) | 537 | switch(CurrentMode) |
538 | { | 538 | { |
539 | case EGUIEDM_RESIZE_T: | 539 | case EGUIEDM_RESIZE_T: |
540 | SelectedArea.UpperLeftCorner.Y = p.Y; | 540 | SelectedArea.UpperLeftCorner.Y = p.Y; |
541 | break; | 541 | break; |
542 | case EGUIEDM_RESIZE_B: | 542 | case EGUIEDM_RESIZE_B: |
543 | SelectedArea.LowerRightCorner.Y = p.Y; | 543 | SelectedArea.LowerRightCorner.Y = p.Y; |
544 | break; | 544 | break; |
545 | case EGUIEDM_RESIZE_L: | 545 | case EGUIEDM_RESIZE_L: |
546 | SelectedArea.UpperLeftCorner.X = p.X; | 546 | SelectedArea.UpperLeftCorner.X = p.X; |
547 | break; | 547 | break; |
548 | case EGUIEDM_RESIZE_R: | 548 | case EGUIEDM_RESIZE_R: |
549 | SelectedArea.LowerRightCorner.X = p.X; | 549 | SelectedArea.LowerRightCorner.X = p.X; |
550 | break; | 550 | break; |
551 | case EGUIEDM_RESIZE_TL: | 551 | case EGUIEDM_RESIZE_TL: |
552 | SelectedArea.UpperLeftCorner = p; | 552 | SelectedArea.UpperLeftCorner = p; |
553 | break; | 553 | break; |
554 | case EGUIEDM_RESIZE_TR: | 554 | case EGUIEDM_RESIZE_TR: |
555 | SelectedArea.UpperLeftCorner.Y = p.Y; | 555 | SelectedArea.UpperLeftCorner.Y = p.Y; |
556 | SelectedArea.LowerRightCorner.X = p.X; | 556 | SelectedArea.LowerRightCorner.X = p.X; |
557 | break; | 557 | break; |
558 | case EGUIEDM_RESIZE_BL: | 558 | case EGUIEDM_RESIZE_BL: |
559 | SelectedArea.UpperLeftCorner.X = p.X; | 559 | SelectedArea.UpperLeftCorner.X = p.X; |
560 | SelectedArea.LowerRightCorner.Y = p.Y; | 560 | SelectedArea.LowerRightCorner.Y = p.Y; |
561 | break; | 561 | break; |
562 | case EGUIEDM_RESIZE_BR: | 562 | case EGUIEDM_RESIZE_BR: |
563 | SelectedArea.LowerRightCorner = p; | 563 | SelectedArea.LowerRightCorner = p; |
564 | break; | 564 | break; |
565 | default: | 565 | default: |
566 | break; | 566 | break; |
567 | } | 567 | } |
568 | } | 568 | } |
569 | 569 | ||
570 | break; | 570 | break; |
571 | default: | 571 | default: |
572 | break; | 572 | break; |
573 | } | 573 | } |
574 | break; | 574 | break; |
575 | 575 | ||
576 | case EET_GUI_EVENT: | 576 | case EET_GUI_EVENT: |
577 | switch(e.GUIEvent.EventType) | 577 | switch(e.GUIEvent.EventType) |
578 | { | 578 | { |
579 | case EGET_TREEVIEW_NODE_SELECT: | 579 | case EGET_TREEVIEW_NODE_SELECT: |
580 | { | 580 | { |
581 | IGUITreeViewNode* eventnode = ((IGUITreeView*)e.GUIEvent.Caller)->getLastEventNode(); | 581 | IGUITreeViewNode* eventnode = ((IGUITreeView*)e.GUIEvent.Caller)->getLastEventNode(); |
582 | if(!eventnode->isRoot()) | 582 | if(!eventnode->isRoot()) |
583 | setSelectedElement((IGUIElement*)(eventnode->getData())); | 583 | setSelectedElement((IGUIElement*)(eventnode->getData())); |
584 | break; | 584 | break; |
585 | } | 585 | } |
586 | // load a gui file | 586 | // load a gui file |
587 | case EGET_FILE_SELECTED: | 587 | case EGET_FILE_SELECTED: |
588 | dialog = (IGUIFileOpenDialog*)e.GUIEvent.Caller; | 588 | dialog = (IGUIFileOpenDialog*)e.GUIEvent.Caller; |
589 | Environment->loadGUI(core::stringc(dialog->getFileName()).c_str()); | 589 | Environment->loadGUI(core::stringc(dialog->getFileName()).c_str()); |
590 | break; | 590 | break; |
591 | 591 | ||
592 | case EGET_MENU_ITEM_SELECTED: | 592 | case EGET_MENU_ITEM_SELECTED: |
593 | { | 593 | { |
594 | IGUIContextMenu *menu = (IGUIContextMenu*)e.GUIEvent.Caller; | 594 | IGUIContextMenu *menu = (IGUIContextMenu*)e.GUIEvent.Caller; |
595 | s32 cmdID = menu->getItemCommandId(menu->getSelectedItem()) - MenuCommandStart; | 595 | s32 cmdID = menu->getItemCommandId(menu->getSelectedItem()) - MenuCommandStart; |
596 | 596 | ||
597 | IGUIElement* el; | 597 | IGUIElement* el; |
598 | 598 | ||
599 | switch(cmdID) | 599 | switch(cmdID) |
600 | { | 600 | { |
601 | 601 | ||
602 | //! file commands | 602 | //! file commands |
603 | case EGUIEDMC_FILE_NEW: | 603 | case EGUIEDMC_FILE_NEW: |
604 | // clear all elements belonging to our parent | 604 | // clear all elements belonging to our parent |
605 | setSelectedElement(0); | 605 | setSelectedElement(0); |
606 | MouseOverElement = 0; | 606 | MouseOverElement = 0; |
607 | el = Parent; | 607 | el = Parent; |
608 | grab(); | 608 | grab(); |
609 | // remove all children | 609 | // remove all children |
610 | while(Children.end() != el->getChildren().begin()) | 610 | while(Children.end() != el->getChildren().begin()) |
611 | el->removeChild(*(el->getChildren().begin())); | 611 | el->removeChild(*(el->getChildren().begin())); |
612 | // attach to parent again | 612 | // attach to parent again |
613 | el->addChild(this); | 613 | el->addChild(this); |
614 | drop(); | 614 | drop(); |
615 | 615 | ||
616 | break; | 616 | break; |
617 | case EGUIEDMC_FILE_LOAD: | 617 | case EGUIEDMC_FILE_LOAD: |
618 | Environment->addFileOpenDialog(L"Please select a GUI file to open", false, this); | 618 | Environment->addFileOpenDialog(L"Please select a GUI file to open", false, this); |
619 | break; | 619 | break; |
620 | case EGUIEDMC_FILE_SAVE: | 620 | case EGUIEDMC_FILE_SAVE: |
621 | Environment->saveGUI("guiTest.xml"); | 621 | Environment->saveGUI("guiTest.xml"); |
622 | break; | 622 | break; |
623 | 623 | ||
624 | //! edit menu | 624 | //! edit menu |
625 | case EGUIEDMC_CUT_ELEMENT: | 625 | case EGUIEDMC_CUT_ELEMENT: |
626 | { | 626 | { |
627 | CopySelectedElementXML(); | 627 | CopySelectedElementXML(); |
628 | // delete element | 628 | // delete element |
629 | el = SelectedElement; | 629 | el = SelectedElement; |
630 | setSelectedElement(0); | 630 | setSelectedElement(0); |
631 | MouseOverElement = 0; | 631 | MouseOverElement = 0; |
632 | el->remove(); | 632 | el->remove(); |
633 | break; | 633 | break; |
634 | } | 634 | } |
635 | case EGUIEDMC_COPY_ELEMENT: | 635 | case EGUIEDMC_COPY_ELEMENT: |
636 | CopySelectedElementXML(); | 636 | CopySelectedElementXML(); |
637 | break; | 637 | break; |
638 | case EGUIEDMC_PASTE_ELEMENT: | 638 | case EGUIEDMC_PASTE_ELEMENT: |
639 | PasteXMLToSelectedElement(); | 639 | PasteXMLToSelectedElement(); |
640 | break; | 640 | break; |
641 | case EGUIEDMC_DELETE_ELEMENT: | 641 | case EGUIEDMC_DELETE_ELEMENT: |
642 | el = SelectedElement; | 642 | el = SelectedElement; |
643 | setSelectedElement(0); | 643 | setSelectedElement(0); |
644 | MouseOverElement = 0; | 644 | MouseOverElement = 0; |
645 | el->remove(); | 645 | el->remove(); |
646 | break; | 646 | break; |
647 | case EGUIEDMC_SET_PARENT: | 647 | case EGUIEDMC_SET_PARENT: |
648 | CurrentMode = EGUIEDM_SELECT_NEW_PARENT; | 648 | CurrentMode = EGUIEDM_SELECT_NEW_PARENT; |
649 | break; | 649 | break; |
650 | case EGUIEDMC_BRING_TO_FRONT: | 650 | case EGUIEDMC_BRING_TO_FRONT: |
651 | if (SelectedElement->getParent()) | 651 | if (SelectedElement->getParent()) |
652 | SelectedElement->getParent()->bringToFront(SelectedElement); | 652 | SelectedElement->getParent()->bringToFront(SelectedElement); |
653 | break; | 653 | break; |
654 | 654 | ||
655 | case EGUIEDMC_SAVE_ELEMENT: | 655 | case EGUIEDMC_SAVE_ELEMENT: |
656 | //TODO: add 'save' dialog. | 656 | //TODO: add 'save' dialog. |
657 | Environment->saveGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); | 657 | Environment->saveGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); |
658 | break; | 658 | break; |
659 | 659 | ||
660 | //! toggle edit window | 660 | //! toggle edit window |
661 | case EGUIEDMC_TOGGLE_EDITOR: | 661 | case EGUIEDMC_TOGGLE_EDITOR: |
662 | break; | 662 | break; |
663 | 663 | ||
664 | case EGUIEDMC_INSERT_XML: | 664 | case EGUIEDMC_INSERT_XML: |
665 | Environment->loadGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); | 665 | Environment->loadGUI("guiTest.xml", SelectedElement ? SelectedElement : Environment->getRootGUIElement() ); |
666 | break; | 666 | break; |
667 | 667 | ||
668 | default: | 668 | default: |
669 | // create element from factory? | 669 | // create element from factory? |
670 | if (cmdID >= EGUIEDMC_COUNT) | 670 | if (cmdID >= EGUIEDMC_COUNT) |
671 | { | 671 | { |
672 | 672 | ||
673 | s32 num = cmdID - EGUIEDMC_COUNT; // get index | 673 | s32 num = cmdID - EGUIEDMC_COUNT; // get index |
674 | // loop through all factories | 674 | // loop through all factories |
675 | s32 i, c=Environment->getRegisteredGUIElementFactoryCount(); | 675 | s32 i, c=Environment->getRegisteredGUIElementFactoryCount(); |
676 | for (i=0; i<c && num > Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); ++i) | 676 | for (i=0; i<c && num > Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); ++i) |
677 | { | 677 | { |
678 | num -= Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); | 678 | num -= Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount(); |
679 | } | 679 | } |
680 | if (num < Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount() ) | 680 | if (num < Environment->getGUIElementFactory(i)->getCreatableGUIElementTypeCount() ) |
681 | { | 681 | { |
682 | core::stringc name = Environment->getGUIElementFactory(i)->getCreateableGUIElementTypeName(num); | 682 | core::stringc name = Environment->getGUIElementFactory(i)->getCreateableGUIElementTypeName(num); |
683 | IGUIElement *parentElement = SelectedElement ? SelectedElement : Environment->getRootGUIElement(); | 683 | IGUIElement *parentElement = SelectedElement ? SelectedElement : Environment->getRootGUIElement(); |
684 | // add it | 684 | // add it |
685 | IGUIElement *newElement = Environment->getGUIElementFactory(i)->addGUIElement(name.c_str(),parentElement); | 685 | IGUIElement *newElement = Environment->getGUIElementFactory(i)->addGUIElement(name.c_str(),parentElement); |
686 | if (newElement) | 686 | if (newElement) |
687 | { | 687 | { |
688 | core::position2di p = DragStart - parentElement->getAbsolutePosition().UpperLeftCorner; | 688 | core::position2di p = DragStart - parentElement->getAbsolutePosition().UpperLeftCorner; |
689 | newElement->setRelativePosition(core::rect<s32>(p,p+core::position2di(100,100))); | 689 | newElement->setRelativePosition(core::rect<s32>(p,p+core::position2di(100,100))); |
690 | //Environment->removeFocus(newElement); | 690 | //Environment->removeFocus(newElement); |
691 | } | 691 | } |
692 | } | 692 | } |
693 | } | 693 | } |
694 | break; | 694 | break; |
695 | } | 695 | } |
696 | EditorWindow->updateTree(); | 696 | EditorWindow->updateTree(); |
697 | } | 697 | } |
698 | return true; | 698 | return true; |
699 | default: | 699 | default: |
700 | break; | 700 | break; |
701 | } | 701 | } |
702 | break; | 702 | break; |
703 | 703 | ||
704 | default: | 704 | default: |
705 | break; | 705 | break; |
706 | } | 706 | } |
707 | 707 | ||
708 | // even if we didn't absorb the event, | 708 | // even if we didn't absorb the event, |
709 | // we never pass events back to the GUI we're editing! | 709 | // we never pass events back to the GUI we're editing! |
710 | return false; | 710 | return false; |
711 | } | 711 | } |
712 | 712 | ||
713 | 713 | ||
714 | //! draws the element and its children | 714 | //! draws the element and its children |
715 | void CGUIEditWorkspace::draw() | 715 | void CGUIEditWorkspace::draw() |
716 | { | 716 | { |
717 | video::IVideoDriver *driver = Environment->getVideoDriver(); | 717 | video::IVideoDriver *driver = Environment->getVideoDriver(); |
718 | 718 | ||
719 | if (DrawGrid) | 719 | if (DrawGrid) |
720 | { | 720 | { |
721 | // draw the grid | 721 | // draw the grid |
722 | 722 | ||
723 | core::rect<s32> r = getAbsolutePosition(); | 723 | core::rect<s32> r = getAbsolutePosition(); |
724 | 724 | ||
725 | s32 cy = r.UpperLeftCorner.Y; | 725 | s32 cy = r.UpperLeftCorner.Y; |
726 | while (cy < r.LowerRightCorner.Y) | 726 | while (cy < r.LowerRightCorner.Y) |
727 | { | 727 | { |
728 | s32 cx = r.UpperLeftCorner.X; | 728 | s32 cx = r.UpperLeftCorner.X; |
729 | while (cx < r.LowerRightCorner.X) | 729 | while (cx < r.LowerRightCorner.X) |
730 | { | 730 | { |
731 | driver->draw2DRectangle(video::SColor(40,0,0,90),core::rect<s32>(cx+1,cy+1,GridSize.Width+cx,GridSize.Height+cy)); | 731 | driver->draw2DRectangle(video::SColor(40,0,0,90),core::rect<s32>(cx+1,cy+1,GridSize.Width+cx,GridSize.Height+cy)); |
732 | cx += GridSize.Width; | 732 | cx += GridSize.Width; |
733 | } | 733 | } |
734 | cy += GridSize.Height; | 734 | cy += GridSize.Height; |
735 | } | 735 | } |
736 | } | 736 | } |
737 | if (MouseOverElement && | 737 | if (MouseOverElement && |
738 | MouseOverElement != SelectedElement && | 738 | MouseOverElement != SelectedElement && |
739 | MouseOverElement != Parent) | 739 | MouseOverElement != Parent) |
740 | { | 740 | { |
741 | core::rect<s32> r = MouseOverElement->getAbsolutePosition(); | 741 | core::rect<s32> r = MouseOverElement->getAbsolutePosition(); |
742 | driver->draw2DRectangle(video::SColor(100,0,0,255), r); | 742 | driver->draw2DRectangle(video::SColor(100,0,0,255), r); |
743 | } | 743 | } |
744 | if (SelectedElement && CurrentMode == EGUIEDM_SELECT) | 744 | if (SelectedElement && CurrentMode == EGUIEDM_SELECT) |
745 | { | 745 | { |
746 | driver->draw2DRectangle(video::SColor(100,0,255,0),SelectedElement->getAbsolutePosition()); | 746 | driver->draw2DRectangle(video::SColor(100,0,255,0),SelectedElement->getAbsolutePosition()); |
747 | } | 747 | } |
748 | if (CurrentMode >= EGUIEDM_MOVE) | 748 | if (CurrentMode >= EGUIEDM_MOVE) |
749 | { | 749 | { |
750 | driver->draw2DRectangle(video::SColor(100,255,0,0),SelectedArea); | 750 | driver->draw2DRectangle(video::SColor(100,255,0,0),SelectedArea); |
751 | } | 751 | } |
752 | 752 | ||
753 | if ( (SelectedElement && CurrentMode >= EGUIEDM_MOVE) || | 753 | if ( (SelectedElement && CurrentMode >= EGUIEDM_MOVE) || |
754 | (SelectedElement && MouseOverElement == SelectedElement && MouseOverMode >= EGUIEDM_MOVE) ) | 754 | (SelectedElement && MouseOverElement == SelectedElement && MouseOverMode >= EGUIEDM_MOVE) ) |
755 | { | 755 | { |
756 | // draw handles for moving | 756 | // draw handles for moving |
757 | EGUIEDIT_MODE m = CurrentMode; | 757 | EGUIEDIT_MODE m = CurrentMode; |
758 | core::rect<s32> r = SelectedArea; | 758 | core::rect<s32> r = SelectedArea; |
759 | if (m < EGUIEDM_MOVE) | 759 | if (m < EGUIEDM_MOVE) |
760 | { | 760 | { |
761 | m = MouseOverMode; | 761 | m = MouseOverMode; |
762 | r = SelectedElement->getAbsolutePosition(); | 762 | r = SelectedElement->getAbsolutePosition(); |
763 | } | 763 | } |
764 | 764 | ||
765 | core::position2di d = core::position2di(4,4); | 765 | core::position2di d = core::position2di(4,4); |
766 | 766 | ||
767 | TLRect = core::rect<s32>(r.UpperLeftCorner, r.UpperLeftCorner + d ); | 767 | TLRect = core::rect<s32>(r.UpperLeftCorner, r.UpperLeftCorner + d ); |
768 | TRRect = core::rect<s32>(r.LowerRightCorner.X-4, r.UpperLeftCorner.Y, r.LowerRightCorner.X, r.UpperLeftCorner.Y+4); | 768 | TRRect = core::rect<s32>(r.LowerRightCorner.X-4, r.UpperLeftCorner.Y, r.LowerRightCorner.X, r.UpperLeftCorner.Y+4); |
769 | TopRect = core::rect<s32>(r.getCenter().X-2, r.UpperLeftCorner.Y,r.getCenter().X+2, r.UpperLeftCorner.Y+4 ); | 769 | TopRect = core::rect<s32>(r.getCenter().X-2, r.UpperLeftCorner.Y,r.getCenter().X+2, r.UpperLeftCorner.Y+4 ); |
770 | BLRect = core::rect<s32>(r.UpperLeftCorner.X, r.LowerRightCorner.Y-4, r.UpperLeftCorner.X+4, r.LowerRightCorner.Y); | 770 | BLRect = core::rect<s32>(r.UpperLeftCorner.X, r.LowerRightCorner.Y-4, r.UpperLeftCorner.X+4, r.LowerRightCorner.Y); |
771 | LRect = core::rect<s32>(r.UpperLeftCorner.X,r.getCenter().Y-2, r.UpperLeftCorner.X+4, r.getCenter().Y+2 ); | 771 | LRect = core::rect<s32>(r.UpperLeftCorner.X,r.getCenter().Y-2, r.UpperLeftCorner.X+4, r.getCenter().Y+2 ); |
772 | RRect = core::rect<s32>(r.LowerRightCorner.X-4,r.getCenter().Y-2, r.LowerRightCorner.X, r.getCenter().Y+2 ); | 772 | RRect = core::rect<s32>(r.LowerRightCorner.X-4,r.getCenter().Y-2, r.LowerRightCorner.X, r.getCenter().Y+2 ); |
773 | BRRect = core::rect<s32>(r.LowerRightCorner-d, r.LowerRightCorner); | 773 | BRRect = core::rect<s32>(r.LowerRightCorner-d, r.LowerRightCorner); |
774 | BRect = core::rect<s32>(r.getCenter().X-2, r.LowerRightCorner.Y-4,r.getCenter().X+2, r.LowerRightCorner.Y ); | 774 | BRect = core::rect<s32>(r.getCenter().X-2, r.LowerRightCorner.Y-4,r.getCenter().X+2, r.LowerRightCorner.Y ); |
775 | 775 | ||
776 | // top left | 776 | // top left |
777 | if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_TL || m == EGUIEDM_MOVE ) | 777 | if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_TL || m == EGUIEDM_MOVE ) |
778 | driver->draw2DRectangle(video::SColor(100,255,255,255), TLRect); | 778 | driver->draw2DRectangle(video::SColor(100,255,255,255), TLRect); |
779 | 779 | ||
780 | if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_TR || m == EGUIEDM_MOVE ) | 780 | if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_TR || m == EGUIEDM_MOVE ) |
781 | driver->draw2DRectangle(video::SColor(100,255,255,255), TRRect); | 781 | driver->draw2DRectangle(video::SColor(100,255,255,255), TRRect); |
782 | 782 | ||
783 | if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_MOVE ) | 783 | if (m == EGUIEDM_RESIZE_T || m == EGUIEDM_MOVE ) |
784 | driver->draw2DRectangle(video::SColor(100,255,255,255), TopRect); | 784 | driver->draw2DRectangle(video::SColor(100,255,255,255), TopRect); |
785 | 785 | ||
786 | if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_BL || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) | 786 | if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_RESIZE_BL || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) |
787 | driver->draw2DRectangle(video::SColor(100,255,255,255), BLRect); | 787 | driver->draw2DRectangle(video::SColor(100,255,255,255), BLRect); |
788 | 788 | ||
789 | if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_MOVE ) | 789 | if (m == EGUIEDM_RESIZE_L || m == EGUIEDM_MOVE ) |
790 | driver->draw2DRectangle(video::SColor(100,255,255,255), LRect); | 790 | driver->draw2DRectangle(video::SColor(100,255,255,255), LRect); |
791 | 791 | ||
792 | if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_MOVE ) | 792 | if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_MOVE ) |
793 | driver->draw2DRectangle(video::SColor(100,255,255,255), RRect); | 793 | driver->draw2DRectangle(video::SColor(100,255,255,255), RRect); |
794 | 794 | ||
795 | if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_BR || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) | 795 | if (m == EGUIEDM_RESIZE_R || m == EGUIEDM_RESIZE_BR || m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) |
796 | driver->draw2DRectangle(video::SColor(100,255,255,255), BRRect ); | 796 | driver->draw2DRectangle(video::SColor(100,255,255,255), BRRect ); |
797 | 797 | ||
798 | if (m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) | 798 | if (m == EGUIEDM_RESIZE_B || m == EGUIEDM_MOVE ) |
799 | driver->draw2DRectangle(video::SColor(100,255,255,255), BRect); | 799 | driver->draw2DRectangle(video::SColor(100,255,255,255), BRect); |
800 | 800 | ||
801 | 801 | ||
802 | } | 802 | } |
803 | 803 | ||
804 | IGUIElement::draw(); | 804 | IGUIElement::draw(); |
805 | } | 805 | } |
806 | 806 | ||
807 | 807 | ||
808 | void CGUIEditWorkspace::setDrawGrid(bool drawGrid) | 808 | void CGUIEditWorkspace::setDrawGrid(bool drawGrid) |
809 | { | 809 | { |
810 | DrawGrid = drawGrid; | 810 | DrawGrid = drawGrid; |
811 | } | 811 | } |
812 | 812 | ||
813 | void CGUIEditWorkspace::setGridSize(const core::dimension2di& gridSize) | 813 | void CGUIEditWorkspace::setGridSize(const core::dimension2di& gridSize) |
814 | { | 814 | { |
815 | GridSize = gridSize; | 815 | GridSize = gridSize; |
816 | if (GridSize.Width < 2) | 816 | if (GridSize.Width < 2) |
817 | GridSize.Width = 2; | 817 | GridSize.Width = 2; |
818 | if (GridSize.Height < 2) | 818 | if (GridSize.Height < 2) |
819 | GridSize.Height = 2; | 819 | GridSize.Height = 2; |
820 | } | 820 | } |
821 | 821 | ||
822 | void CGUIEditWorkspace::setUseGrid(bool useGrid) | 822 | void CGUIEditWorkspace::setUseGrid(bool useGrid) |
823 | { | 823 | { |
824 | UseGrid = useGrid; | 824 | UseGrid = useGrid; |
825 | } | 825 | } |
826 | 826 | ||
827 | 827 | ||
828 | //! Removes a child. | 828 | //! Removes a child. |
829 | void CGUIEditWorkspace::removeChild(IGUIElement* child) | 829 | void CGUIEditWorkspace::removeChild(IGUIElement* child) |
830 | { | 830 | { |
831 | IGUIElement::removeChild(child); | 831 | IGUIElement::removeChild(child); |
832 | 832 | ||
833 | if (Children.empty()) | 833 | if (Children.empty()) |
834 | remove(); | 834 | remove(); |
835 | } | 835 | } |
836 | 836 | ||
837 | 837 | ||
838 | void CGUIEditWorkspace::updateAbsolutePosition() | 838 | void CGUIEditWorkspace::updateAbsolutePosition() |
839 | { | 839 | { |
840 | core::rect<s32> parentRect(0,0,0,0); | 840 | core::rect<s32> parentRect(0,0,0,0); |
841 | 841 | ||
842 | if (Parent) | 842 | if (Parent) |
843 | { | 843 | { |
844 | parentRect = Parent->getAbsolutePosition(); | 844 | parentRect = Parent->getAbsolutePosition(); |
845 | RelativeRect.UpperLeftCorner.X = 0; | 845 | RelativeRect.UpperLeftCorner.X = 0; |
846 | RelativeRect.UpperLeftCorner.Y = 0; | 846 | RelativeRect.UpperLeftCorner.Y = 0; |
847 | RelativeRect.LowerRightCorner.X = parentRect.getWidth(); | 847 | RelativeRect.LowerRightCorner.X = parentRect.getWidth(); |
848 | RelativeRect.LowerRightCorner.Y = parentRect.getHeight(); | 848 | RelativeRect.LowerRightCorner.Y = parentRect.getHeight(); |
849 | } | 849 | } |
850 | 850 | ||
851 | IGUIElement::updateAbsolutePosition(); | 851 | IGUIElement::updateAbsolutePosition(); |
852 | } | 852 | } |
853 | 853 | ||
854 | void CGUIEditWorkspace::CopySelectedElementXML() | 854 | void CGUIEditWorkspace::CopySelectedElementXML() |
855 | { | 855 | { |
856 | core::stringc XMLText; | 856 | core::stringc XMLText; |
857 | core::stringw wXMLText; | 857 | core::stringw wXMLText; |
858 | // create memory write file | 858 | // create memory write file |
859 | io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); | 859 | io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); |
860 | // save gui to mem file | 860 | // save gui to mem file |
861 | io::IXMLWriter* xml = Environment->getFileSystem()->createXMLWriter(memWrite); | 861 | io::IXMLWriter* xml = Environment->getFileSystem()->createXMLWriter(memWrite); |
862 | Environment->writeGUIElement(xml, SelectedElement); | 862 | Environment->writeGUIElement(xml, SelectedElement); |
863 | 863 | ||
864 | // copy to clipboard- wide chars not supported yet :( | 864 | // copy to clipboard- wide chars not supported yet :( |
865 | wXMLText = (wchar_t*)&memWrite->getData()[0]; | 865 | wXMLText = (wchar_t*)&memWrite->getData()[0]; |
866 | u32 i = memWrite->getData().size()/sizeof(wchar_t); | 866 | u32 i = memWrite->getData().size()/sizeof(wchar_t); |
867 | if (wXMLText.size() > i) | 867 | if (wXMLText.size() > i) |
868 | wXMLText[i] = L'\0'; | 868 | wXMLText[i] = L'\0'; |
869 | XMLText = wXMLText.c_str(); | 869 | XMLText = wXMLText.c_str(); |
870 | memWrite->drop(); | 870 | memWrite->drop(); |
871 | xml->drop(); | 871 | xml->drop(); |
872 | Environment->getOSOperator()->copyToClipboard(XMLText.c_str()); | 872 | Environment->getOSOperator()->copyToClipboard(XMLText.c_str()); |
873 | } | 873 | } |
874 | 874 | ||
875 | void CGUIEditWorkspace::PasteXMLToSelectedElement() | 875 | void CGUIEditWorkspace::PasteXMLToSelectedElement() |
876 | { | 876 | { |
877 | // get clipboard data | 877 | // get clipboard data |
878 | core::stringc XMLText = Environment->getOSOperator()->getTextFromClipboard(); | 878 | core::stringc XMLText = Environment->getOSOperator()->getTextFromClipboard(); |
879 | // convert to stringw | 879 | // convert to stringw |
880 | core::stringw wXMLText = XMLText.c_str(); | 880 | core::stringw wXMLText = XMLText.c_str(); |
881 | 881 | ||
882 | io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); | 882 | io::CMemoryReadWriteFile* memWrite = new io::CMemoryReadWriteFile("#Clipboard#"); |
883 | 883 | ||
884 | io::IXMLWriter* xmlw = Environment->getFileSystem()->createXMLWriter(memWrite); | 884 | io::IXMLWriter* xmlw = Environment->getFileSystem()->createXMLWriter(memWrite); |
885 | xmlw->writeXMLHeader(); // it needs one of those | 885 | xmlw->writeXMLHeader(); // it needs one of those |
886 | xmlw->drop(); | 886 | xmlw->drop(); |
887 | 887 | ||
888 | // write clipboard data | 888 | // write clipboard data |
889 | memWrite->write((void*)&wXMLText[0], wXMLText.size() * sizeof(wchar_t)); | 889 | memWrite->write((void*)&wXMLText[0], wXMLText.size() * sizeof(wchar_t)); |
890 | 890 | ||
891 | // rewind file | 891 | // rewind file |
892 | memWrite->seek(0, false); | 892 | memWrite->seek(0, false); |
893 | 893 | ||
894 | // read xml | 894 | // read xml |
895 | Environment->loadGUI(memWrite, SelectedElement); | 895 | Environment->loadGUI(memWrite, SelectedElement); |
896 | 896 | ||
897 | // reset focus | 897 | // reset focus |
898 | Environment->setFocus(this); | 898 | Environment->setFocus(this); |
899 | 899 | ||
900 | // drop the read file | 900 | // drop the read file |
901 | memWrite->drop(); | 901 | memWrite->drop(); |
902 | } | 902 | } |
903 | 903 | ||
904 | void CGUIEditWorkspace::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) | 904 | void CGUIEditWorkspace::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) |
905 | { | 905 | { |
906 | out->addBool("DrawGrid", DrawGrid); | 906 | out->addBool("DrawGrid", DrawGrid); |
907 | out->addBool("UseGrid", UseGrid); | 907 | out->addBool("UseGrid", UseGrid); |
908 | out->addPosition2d("GridSize", core::position2di(GridSize.Width, GridSize.Height)); | 908 | out->addPosition2d("GridSize", core::position2di(GridSize.Width, GridSize.Height)); |
909 | out->addInt("MenuCommandStart", MenuCommandStart); | 909 | out->addInt("MenuCommandStart", MenuCommandStart); |
910 | } | 910 | } |
911 | 911 | ||
912 | void CGUIEditWorkspace::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) | 912 | void CGUIEditWorkspace::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) |
913 | { | 913 | { |
914 | setDrawGrid(in->getAttributeAsBool("DrawGrid")); | 914 | setDrawGrid(in->getAttributeAsBool("DrawGrid")); |
915 | setUseGrid(in->getAttributeAsBool("UseGrid")); | 915 | setUseGrid(in->getAttributeAsBool("UseGrid")); |
916 | 916 | ||
917 | core::position2di tmpp = in->getAttributeAsPosition2d("GridSize"); | 917 | core::position2di tmpp = in->getAttributeAsPosition2d("GridSize"); |
918 | core::dimension2di tmpd(tmpp.X, tmpp.Y); | 918 | core::dimension2di tmpd(tmpp.X, tmpp.Y); |
919 | setGridSize(tmpd); | 919 | setGridSize(tmpd); |
920 | setMenuCommandIDStart(in->getAttributeAsInt("MenuCommandStart")); | 920 | setMenuCommandIDStart(in->getAttributeAsInt("MenuCommandStart")); |
921 | } | 921 | } |
922 | 922 | ||
923 | 923 | ||
924 | } // end namespace gui | 924 | } // end namespace gui |
925 | } // end namespace irr | 925 | } // end namespace irr |
926 | 926 | ||
927 | 927 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h index 3f21258..c9ccd14 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEditWorkspace.h | |||
@@ -1,168 +1,168 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_GUIEDIT_WORKSPACE_H_INCLUDED__ | 5 | #ifndef __C_GUIEDIT_WORKSPACE_H_INCLUDED__ |
6 | #define __C_GUIEDIT_WORKSPACE_H_INCLUDED__ | 6 | #define __C_GUIEDIT_WORKSPACE_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IGUIElement.h" | 8 | #include "IGUIElement.h" |
9 | #include "CGUIEditWindow.h" | 9 | #include "CGUIEditWindow.h" |
10 | #include "EGUIEditTypes.h" | 10 | #include "EGUIEditTypes.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace gui | 14 | namespace gui |
15 | { | 15 | { |
16 | 16 | ||
17 | //! Adding the GUI Editor Workspace to an element allows you | 17 | //! Adding the GUI Editor Workspace to an element allows you |
18 | /** to create, edit, load and save any elements supported | 18 | /** to create, edit, load and save any elements supported |
19 | by any loaded factories. | 19 | by any loaded factories. |
20 | When you add it without a parent (to the root element) | 20 | When you add it without a parent (to the root element) |
21 | it will also allow you to edit, load and save settings in | 21 | it will also allow you to edit, load and save settings in |
22 | the current skin. | 22 | the current skin. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | // custom events | 25 | // custom events |
26 | enum EGUIEDIT_CUSTOM_EVENTS | 26 | enum EGUIEDIT_CUSTOM_EVENTS |
27 | { | 27 | { |
28 | EGUIEDCE_ATTRIB_EDITOR = MAKE_IRR_ID('g','A','t','t'), | 28 | EGUIEDCE_ATTRIB_EDITOR = MAKE_IRR_ID('g','A','t','t'), |
29 | EGUIEDCE_OPTION_EDITOR = MAKE_IRR_ID('g','O','p','t'), | 29 | EGUIEDCE_OPTION_EDITOR = MAKE_IRR_ID('g','O','p','t'), |
30 | EGUIEDCE_ENV_EDITOR = MAKE_IRR_ID('g','E','n','v') | 30 | EGUIEDCE_ENV_EDITOR = MAKE_IRR_ID('g','E','n','v') |
31 | }; | 31 | }; |
32 | 32 | ||
33 | class CGUIEditWorkspace : public IGUIElement | 33 | class CGUIEditWorkspace : public IGUIElement |
34 | { | 34 | { |
35 | public: | 35 | public: |
36 | 36 | ||
37 | //! constructor | 37 | //! constructor |
38 | CGUIEditWorkspace(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); | 38 | CGUIEditWorkspace(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); |
39 | 39 | ||
40 | //! destructor | 40 | //! destructor |
41 | ~CGUIEditWorkspace(); | 41 | ~CGUIEditWorkspace(); |
42 | 42 | ||
43 | //! called if an event happened. | 43 | //! called if an event happened. |
44 | virtual bool OnEvent(const SEvent &event); | 44 | virtual bool OnEvent(const SEvent &event); |
45 | 45 | ||
46 | //! Removes a child. | 46 | //! Removes a child. |
47 | virtual void removeChild(IGUIElement* child); | 47 | virtual void removeChild(IGUIElement* child); |
48 | 48 | ||
49 | //! draws the element and its children | 49 | //! draws the element and its children |
50 | virtual void draw(); | 50 | virtual void draw(); |
51 | 51 | ||
52 | //! Updates the absolute position. | 52 | //! Updates the absolute position. |
53 | virtual void updateAbsolutePosition(); | 53 | virtual void updateAbsolutePosition(); |
54 | 54 | ||
55 | //! Sets the menu command id's | 55 | //! Sets the menu command id's |
56 | /** The GUI editor defaults to command ID's from 0xED17 to 0xED17+EGUIEDMC_COUNT | 56 | /** The GUI editor defaults to command ID's from 0xED17 to 0xED17+EGUIEDMC_COUNT |
57 | In the rare case that these are already in use and you wish to use menus | 57 | In the rare case that these are already in use and you wish to use menus |
58 | while the editor is present you can set a new offset here. | 58 | while the editor is present you can set a new offset here. |
59 | */ | 59 | */ |
60 | virtual void setMenuCommandIDStart(s32 id); | 60 | virtual void setMenuCommandIDStart(s32 id); |
61 | 61 | ||
62 | //! grid drawing... | 62 | //! grid drawing... |
63 | virtual void setDrawGrid(bool drawGrid); | 63 | virtual void setDrawGrid(bool drawGrid); |
64 | virtual void setGridSize(const core::dimension2di& gridSize); | 64 | virtual void setGridSize(const core::dimension2di& gridSize); |
65 | virtual void setUseGrid(bool useGrid); | 65 | virtual void setUseGrid(bool useGrid); |
66 | 66 | ||
67 | //! returns the first editable element under the mouse | 67 | //! returns the first editable element under the mouse |
68 | virtual IGUIElement* getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index=0 ); | 68 | virtual IGUIElement* getEditableElementFromPoint(IGUIElement *start, const core::position2di &point, s32 index=0 ); |
69 | 69 | ||
70 | //! selecting elements | 70 | //! selecting elements |
71 | virtual void setSelectedElement(IGUIElement *sel); | 71 | virtual void setSelectedElement(IGUIElement *sel); |
72 | virtual void selectNextSibling(); | 72 | virtual void selectNextSibling(); |
73 | virtual void selectPreviousSibling(); | 73 | virtual void selectPreviousSibling(); |
74 | 74 | ||
75 | //! returns the selected element | 75 | //! returns the selected element |
76 | virtual IGUIElement* getSelectedElement(); | 76 | virtual IGUIElement* getSelectedElement(); |
77 | 77 | ||
78 | //! copies the xml of the selected element and all children to the clipboard | 78 | //! copies the xml of the selected element and all children to the clipboard |
79 | virtual void CopySelectedElementXML(); | 79 | virtual void CopySelectedElementXML(); |
80 | 80 | ||
81 | //! copies the xml of the selected element and all children to the clipboard | 81 | //! copies the xml of the selected element and all children to the clipboard |
82 | virtual void PasteXMLToSelectedElement(); | 82 | virtual void PasteXMLToSelectedElement(); |
83 | 83 | ||
84 | virtual const c8* getTypeName() const | 84 | virtual const c8* getTypeName() const |
85 | { | 85 | { |
86 | return GUIEditElementTypeNames[EGUIEDIT_GUIEDIT]; | 86 | return GUIEditElementTypeNames[EGUIEDIT_GUIEDIT]; |
87 | } | 87 | } |
88 | 88 | ||
89 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); | 89 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); |
90 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); | 90 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); |
91 | 91 | ||
92 | private: | 92 | private: |
93 | 93 | ||
94 | enum EGUIEDIT_MODE | 94 | enum EGUIEDIT_MODE |
95 | { | 95 | { |
96 | // when we are currently selecting an element | 96 | // when we are currently selecting an element |
97 | EGUIEDM_SELECT=0, | 97 | EGUIEDM_SELECT=0, |
98 | // selecting a new parent for the selected element | 98 | // selecting a new parent for the selected element |
99 | EGUIEDM_SELECT_NEW_PARENT, | 99 | EGUIEDM_SELECT_NEW_PARENT, |
100 | 100 | ||
101 | // moving the selected element | 101 | // moving the selected element |
102 | EGUIEDM_MOVE, | 102 | EGUIEDM_MOVE, |
103 | // resizing the selected element | 103 | // resizing the selected element |
104 | EGUIEDM_RESIZE_TL, | 104 | EGUIEDM_RESIZE_TL, |
105 | EGUIEDM_RESIZE_T, | 105 | EGUIEDM_RESIZE_T, |
106 | EGUIEDM_RESIZE_TR, | 106 | EGUIEDM_RESIZE_TR, |
107 | EGUIEDM_RESIZE_R, | 107 | EGUIEDM_RESIZE_R, |
108 | EGUIEDM_RESIZE_BR, | 108 | EGUIEDM_RESIZE_BR, |
109 | EGUIEDM_RESIZE_B, | 109 | EGUIEDM_RESIZE_B, |
110 | EGUIEDM_RESIZE_BL, | 110 | EGUIEDM_RESIZE_BL, |
111 | EGUIEDM_RESIZE_L | 111 | EGUIEDM_RESIZE_L |
112 | }; | 112 | }; |
113 | 113 | ||
114 | enum EGUIEDIT_MENUCOMMANDS | 114 | enum EGUIEDIT_MENUCOMMANDS |
115 | { | 115 | { |
116 | //! file commands | 116 | //! file commands |
117 | EGUIEDMC_FILE_NEW, | 117 | EGUIEDMC_FILE_NEW, |
118 | EGUIEDMC_FILE_LOAD, | 118 | EGUIEDMC_FILE_LOAD, |
119 | EGUIEDMC_FILE_SAVE, | 119 | EGUIEDMC_FILE_SAVE, |
120 | //! edit menu | 120 | //! edit menu |
121 | EGUIEDMC_CUT_ELEMENT, | 121 | EGUIEDMC_CUT_ELEMENT, |
122 | EGUIEDMC_COPY_ELEMENT, | 122 | EGUIEDMC_COPY_ELEMENT, |
123 | EGUIEDMC_PASTE_ELEMENT, | 123 | EGUIEDMC_PASTE_ELEMENT, |
124 | EGUIEDMC_DELETE_ELEMENT, | 124 | EGUIEDMC_DELETE_ELEMENT, |
125 | EGUIEDMC_SET_PARENT, | 125 | EGUIEDMC_SET_PARENT, |
126 | EGUIEDMC_BRING_TO_FRONT, | 126 | EGUIEDMC_BRING_TO_FRONT, |
127 | EGUIEDMC_SAVE_ELEMENT, | 127 | EGUIEDMC_SAVE_ELEMENT, |
128 | //! grid | 128 | //! grid |
129 | EGUIEDMC_TOGGLE_EDITOR, | 129 | EGUIEDMC_TOGGLE_EDITOR, |
130 | 130 | ||
131 | EGUIEDMC_INSERT_XML, | 131 | EGUIEDMC_INSERT_XML, |
132 | 132 | ||
133 | //! number of menu options | 133 | //! number of menu options |
134 | EGUIEDMC_COUNT | 134 | EGUIEDMC_COUNT |
135 | }; | 135 | }; |
136 | 136 | ||
137 | EGUIEDIT_MODE getModeFromPos(core::position2di p); | 137 | EGUIEDIT_MODE getModeFromPos(core::position2di p); |
138 | 138 | ||
139 | EGUIEDIT_MODE CurrentMode; | 139 | EGUIEDIT_MODE CurrentMode; |
140 | EGUIEDIT_MODE MouseOverMode; | 140 | EGUIEDIT_MODE MouseOverMode; |
141 | core::position2di DragStart; | 141 | core::position2di DragStart; |
142 | core::position2di StartMovePos; | 142 | core::position2di StartMovePos; |
143 | core::rect<s32> SelectedArea; | 143 | core::rect<s32> SelectedArea; |
144 | 144 | ||
145 | core::dimension2di GridSize; | 145 | core::dimension2di GridSize; |
146 | s32 MenuCommandStart; | 146 | s32 MenuCommandStart; |
147 | bool DrawGrid, UseGrid; | 147 | bool DrawGrid, UseGrid; |
148 | 148 | ||
149 | IGUIElement *MouseOverElement, | 149 | IGUIElement *MouseOverElement, |
150 | *SelectedElement; | 150 | *SelectedElement; |
151 | CGUIEditWindow *EditorWindow; | 151 | CGUIEditWindow *EditorWindow; |
152 | 152 | ||
153 | core::rect<s32> TLRect; | 153 | core::rect<s32> TLRect; |
154 | core::rect<s32> TRRect; | 154 | core::rect<s32> TRRect; |
155 | core::rect<s32> TopRect; | 155 | core::rect<s32> TopRect; |
156 | core::rect<s32> BLRect; | 156 | core::rect<s32> BLRect; |
157 | core::rect<s32> LRect; | 157 | core::rect<s32> LRect; |
158 | core::rect<s32> RRect; | 158 | core::rect<s32> RRect; |
159 | core::rect<s32> BRRect; | 159 | core::rect<s32> BRRect; |
160 | core::rect<s32> BRect; | 160 | core::rect<s32> BRect; |
161 | }; | 161 | }; |
162 | 162 | ||
163 | 163 | ||
164 | } // end namespace gui | 164 | } // end namespace gui |
165 | } // end namespace irr | 165 | } // end namespace irr |
166 | 166 | ||
167 | #endif | 167 | #endif |
168 | 168 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h index 9e3958d..31951e5 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIEnumAttribute.h | |||
@@ -1,114 +1,114 @@ | |||
1 | #ifndef __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ | 1 | #ifndef __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ |
2 | #define __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ | 2 | #define __C_GUI_ENUM_ATTRIBUTE_H_INCLUDED__ |
3 | 3 | ||
4 | #include "CGUIAttribute.h" | 4 | #include "CGUIAttribute.h" |
5 | #include "IGUIComboBox.h" | 5 | #include "IGUIComboBox.h" |
6 | #include "IGUIEditBox.h" | 6 | #include "IGUIEditBox.h" |
7 | #include "EGUIEditTypes.h" | 7 | #include "EGUIEditTypes.h" |
8 | 8 | ||
9 | namespace irr | 9 | namespace irr |
10 | { | 10 | { |
11 | namespace gui | 11 | namespace gui |
12 | { | 12 | { |
13 | 13 | ||
14 | class CGUIEnumAttribute : public CGUIAttribute | 14 | class CGUIEnumAttribute : public CGUIAttribute |
15 | { | 15 | { |
16 | public: | 16 | public: |
17 | // | 17 | // |
18 | CGUIEnumAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : | 18 | CGUIEnumAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : |
19 | CGUIAttribute(environment, parent, myParentID), | 19 | CGUIAttribute(environment, parent, myParentID), |
20 | AttribComboBox(0), AttribEditBox(0) | 20 | AttribComboBox(0), AttribEditBox(0) |
21 | { | 21 | { |
22 | 22 | ||
23 | } | 23 | } |
24 | 24 | ||
25 | virtual ~CGUIEnumAttribute() | 25 | virtual ~CGUIEnumAttribute() |
26 | { | 26 | { |
27 | if (AttribComboBox) | 27 | if (AttribComboBox) |
28 | AttribComboBox->drop(); | 28 | AttribComboBox->drop(); |
29 | if (AttribEditBox) | 29 | if (AttribEditBox) |
30 | AttribEditBox->drop(); | 30 | AttribEditBox->drop(); |
31 | } | 31 | } |
32 | 32 | ||
33 | // save the attribute and possibly post the event to its parent | 33 | // save the attribute and possibly post the event to its parent |
34 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) | 34 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) |
35 | { | 35 | { |
36 | 36 | ||
37 | if (AttribComboBox) | 37 | if (AttribComboBox) |
38 | { | 38 | { |
39 | AttribComboBox->remove(); | 39 | AttribComboBox->remove(); |
40 | AttribComboBox->drop(); | 40 | AttribComboBox->drop(); |
41 | AttribComboBox = 0; | 41 | AttribComboBox = 0; |
42 | } | 42 | } |
43 | 43 | ||
44 | if (AttribEditBox) | 44 | if (AttribEditBox) |
45 | { | 45 | { |
46 | AttribEditBox->remove(); | 46 | AttribEditBox->remove(); |
47 | AttribEditBox->drop(); | 47 | AttribEditBox->drop(); |
48 | AttribEditBox = 0; | 48 | AttribEditBox = 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | core::array<core::stringc> outLiterals; | 51 | core::array<core::stringc> outLiterals; |
52 | attribs->getAttributeEnumerationLiteralsOfEnumeration(attribIndex, outLiterals); | 52 | attribs->getAttributeEnumerationLiteralsOfEnumeration(attribIndex, outLiterals); |
53 | 53 | ||
54 | core::rect<s32> r = getAbsolutePosition(); | 54 | core::rect<s32> r = getAbsolutePosition(); |
55 | core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, | 55 | core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, |
56 | r.getWidth() - 5, | 56 | r.getWidth() - 5, |
57 | Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 20 ); | 57 | Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 20 ); |
58 | 58 | ||
59 | if (outLiterals.size() > 0) | 59 | if (outLiterals.size() > 0) |
60 | { | 60 | { |
61 | AttribComboBox = Environment->addComboBox(r2, this, -1); | 61 | AttribComboBox = Environment->addComboBox(r2, this, -1); |
62 | for (u32 i=0; i<outLiterals.size(); ++i) | 62 | for (u32 i=0; i<outLiterals.size(); ++i) |
63 | AttribComboBox->addItem( core::stringw(outLiterals[i].c_str()).c_str()); | 63 | AttribComboBox->addItem( core::stringw(outLiterals[i].c_str()).c_str()); |
64 | 64 | ||
65 | AttribComboBox->setSelected( attribs->getAttributeAsInt(attribIndex) ); | 65 | AttribComboBox->setSelected( attribs->getAttributeAsInt(attribIndex) ); |
66 | 66 | ||
67 | AttribComboBox->grab(); | 67 | AttribComboBox->grab(); |
68 | AttribComboBox->setSubElement(true); | 68 | AttribComboBox->setSubElement(true); |
69 | AttribComboBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 69 | AttribComboBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
70 | } | 70 | } |
71 | else | 71 | else |
72 | { | 72 | { |
73 | 73 | ||
74 | AttribEditBox = Environment->addEditBox( | 74 | AttribEditBox = Environment->addEditBox( |
75 | attribs->getAttributeAsStringW(attribIndex).c_str(), | 75 | attribs->getAttributeAsStringW(attribIndex).c_str(), |
76 | r2, true, this, -1); | 76 | r2, true, this, -1); |
77 | AttribEditBox->grab(); | 77 | AttribEditBox->grab(); |
78 | AttribEditBox->setSubElement(true); | 78 | AttribEditBox->setSubElement(true); |
79 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 79 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
80 | } | 80 | } |
81 | 81 | ||
82 | CGUIAttribute::setAttrib(attribs, attribIndex); | 82 | CGUIAttribute::setAttrib(attribs, attribIndex); |
83 | } | 83 | } |
84 | 84 | ||
85 | //! save the attribute and possibly post the event to its parent | 85 | //! save the attribute and possibly post the event to its parent |
86 | virtual bool updateAttrib(bool sendEvent=true) | 86 | virtual bool updateAttrib(bool sendEvent=true) |
87 | { | 87 | { |
88 | if (!Attribs) | 88 | if (!Attribs) |
89 | return true; | 89 | return true; |
90 | 90 | ||
91 | if (AttribComboBox) | 91 | if (AttribComboBox) |
92 | Attribs->setAttribute(Index, AttribComboBox->getText()); | 92 | Attribs->setAttribute(Index, AttribComboBox->getText()); |
93 | else if (AttribEditBox) | 93 | else if (AttribEditBox) |
94 | Attribs->setAttribute(Index, AttribEditBox->getText()); | 94 | Attribs->setAttribute(Index, AttribEditBox->getText()); |
95 | 95 | ||
96 | return CGUIAttribute::updateAttrib(sendEvent); | 96 | return CGUIAttribute::updateAttrib(sendEvent); |
97 | } | 97 | } |
98 | 98 | ||
99 | //! Returns the type name of the gui element. | 99 | //! Returns the type name of the gui element. |
100 | virtual const c8* getTypeName() const | 100 | virtual const c8* getTypeName() const |
101 | { | 101 | { |
102 | return GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE]; | 102 | return GUIEditElementTypeNames[EGUIEDIT_ENUMATTRIBUTE]; |
103 | } | 103 | } |
104 | 104 | ||
105 | private: | 105 | private: |
106 | IGUIComboBox* AttribComboBox; | 106 | IGUIComboBox* AttribComboBox; |
107 | IGUIEditBox* AttribEditBox; | 107 | IGUIEditBox* AttribEditBox; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | } // namespace gui | 110 | } // namespace gui |
111 | } // namespace irr | 111 | } // namespace irr |
112 | 112 | ||
113 | #endif | 113 | #endif |
114 | 114 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp index 4135b7a..0ef1f36 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.cpp | |||
@@ -1,340 +1,340 @@ | |||
1 | // Copyright 2006-2012 Asger Feldthaus | 1 | // Copyright 2006-2012 Asger Feldthaus |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | /* | 5 | /* |
6 | Originally Klasker's but I've messed around with it lots - Gaz | 6 | Originally Klasker's but I've messed around with it lots - Gaz |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "CGUIPanel.h" | 9 | #include "CGUIPanel.h" |
10 | #include "IGUIEnvironment.h" | 10 | #include "IGUIEnvironment.h" |
11 | #include "IGUIScrollBar.h" | 11 | #include "IGUIScrollBar.h" |
12 | #include "IGUITabControl.h" | 12 | #include "IGUITabControl.h" |
13 | #include "IVideoDriver.h" | 13 | #include "IVideoDriver.h" |
14 | 14 | ||
15 | const int SCROLL_BAR_SIZE = 16; // Scroll bars are 16 pixels wide | 15 | const int SCROLL_BAR_SIZE = 16; // Scroll bars are 16 pixels wide |
16 | const int BORDER_WIDTH = 2; | 16 | const int BORDER_WIDTH = 2; |
17 | 17 | ||
18 | namespace irr | 18 | namespace irr |
19 | { | 19 | { |
20 | namespace gui | 20 | namespace gui |
21 | { | 21 | { |
22 | 22 | ||
23 | CGUIPanel::CGUIPanel(IGUIEnvironment* environment, IGUIElement* parent, s32 id, const core::rect<s32>& rectangle, | 23 | CGUIPanel::CGUIPanel(IGUIEnvironment* environment, IGUIElement* parent, s32 id, const core::rect<s32>& rectangle, |
24 | bool border, E_SCROLL_BAR_MODE vMode, E_SCROLL_BAR_MODE hMode) | 24 | bool border, E_SCROLL_BAR_MODE vMode, E_SCROLL_BAR_MODE hMode) |
25 | : IGUIElement(EGUIET_ELEMENT, environment, parent, id, rectangle), | 25 | : IGUIElement(EGUIET_ELEMENT, environment, parent, id, rectangle), |
26 | VScrollBar(0), HScrollBar(0), ClipPane(0), InnerPane(0), | 26 | VScrollBar(0), HScrollBar(0), ClipPane(0), InnerPane(0), |
27 | VScrollBarMode(vMode), HScrollBarMode(hMode), NeedsUpdate(true), Border(border) | 27 | VScrollBarMode(vMode), HScrollBarMode(hMode), NeedsUpdate(true), Border(border) |
28 | { | 28 | { |
29 | #ifdef _DEBUG | 29 | #ifdef _DEBUG |
30 | setDebugName("CGUIPanel"); | 30 | setDebugName("CGUIPanel"); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | s32 width = rectangle.getWidth(); | 33 | s32 width = rectangle.getWidth(); |
34 | s32 height = rectangle.getHeight(); | 34 | s32 height = rectangle.getHeight(); |
35 | 35 | ||
36 | core::rect<s32> rct = core::rect<s32>(width - SCROLL_BAR_SIZE,0, width, height); | 36 | core::rect<s32> rct = core::rect<s32>(width - SCROLL_BAR_SIZE,0, width, height); |
37 | 37 | ||
38 | VScrollBar = environment->addScrollBar(false, rct, 0, id); | 38 | VScrollBar = environment->addScrollBar(false, rct, 0, id); |
39 | VScrollBar->setSubElement(true); | 39 | VScrollBar->setSubElement(true); |
40 | VScrollBar->setTabStop(false); | 40 | VScrollBar->setTabStop(false); |
41 | VScrollBar->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 41 | VScrollBar->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
42 | VScrollBar->grab(); | 42 | VScrollBar->grab(); |
43 | IGUIElement::addChild(VScrollBar); | 43 | IGUIElement::addChild(VScrollBar); |
44 | 44 | ||
45 | rct = core::rect<s32>(0, height - SCROLL_BAR_SIZE, width - SCROLL_BAR_SIZE,height ); | 45 | rct = core::rect<s32>(0, height - SCROLL_BAR_SIZE, width - SCROLL_BAR_SIZE,height ); |
46 | 46 | ||
47 | HScrollBar = environment->addScrollBar(true, rct, 0, id); | 47 | HScrollBar = environment->addScrollBar(true, rct, 0, id); |
48 | HScrollBar->setSubElement(true); | 48 | HScrollBar->setSubElement(true); |
49 | HScrollBar->setTabStop(false); | 49 | HScrollBar->setTabStop(false); |
50 | HScrollBar->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); | 50 | HScrollBar->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT); |
51 | HScrollBar->grab(); | 51 | HScrollBar->grab(); |
52 | IGUIElement::addChild(HScrollBar); | 52 | IGUIElement::addChild(HScrollBar); |
53 | 53 | ||
54 | rct = core::rect<s32>(0,0, width - SCROLL_BAR_SIZE, height - SCROLL_BAR_SIZE); | 54 | rct = core::rect<s32>(0,0, width - SCROLL_BAR_SIZE, height - SCROLL_BAR_SIZE); |
55 | 55 | ||
56 | ClipPane = environment->addTab( rct, 0, -1); | 56 | ClipPane = environment->addTab( rct, 0, -1); |
57 | ClipPane->setSubElement(true); | 57 | ClipPane->setSubElement(true); |
58 | ClipPane->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 58 | ClipPane->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
59 | ClipPane->grab(); | 59 | ClipPane->grab(); |
60 | IGUIElement::addChild(ClipPane); | 60 | IGUIElement::addChild(ClipPane); |
61 | 61 | ||
62 | InnerPane = environment->addTab(rct, ClipPane, -1); | 62 | InnerPane = environment->addTab(rct, ClipPane, -1); |
63 | InnerPane->setSubElement(true); | 63 | InnerPane->setSubElement(true); |
64 | InnerPane->grab(); | 64 | InnerPane->grab(); |
65 | 65 | ||
66 | calculateClientArea(); | 66 | calculateClientArea(); |
67 | resizeInnerPane(); | 67 | resizeInnerPane(); |
68 | } | 68 | } |
69 | 69 | ||
70 | CGUIPanel::~CGUIPanel() | 70 | CGUIPanel::~CGUIPanel() |
71 | { | 71 | { |
72 | // because the inner pane has the list of children, we need to remove the outer ones manually | 72 | // because the inner pane has the list of children, we need to remove the outer ones manually |
73 | IGUIElement::removeChild(VScrollBar); | 73 | IGUIElement::removeChild(VScrollBar); |
74 | IGUIElement::removeChild(HScrollBar); | 74 | IGUIElement::removeChild(HScrollBar); |
75 | IGUIElement::removeChild(ClipPane); | 75 | IGUIElement::removeChild(ClipPane); |
76 | 76 | ||
77 | // now we can drop the others | 77 | // now we can drop the others |
78 | VScrollBar->drop(); | 78 | VScrollBar->drop(); |
79 | HScrollBar->drop(); | 79 | HScrollBar->drop(); |
80 | ClipPane->drop(); | 80 | ClipPane->drop(); |
81 | InnerPane->drop(); | 81 | InnerPane->drop(); |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | void CGUIPanel::draw() | 85 | void CGUIPanel::draw() |
86 | { | 86 | { |
87 | if (NeedsUpdate) | 87 | if (NeedsUpdate) |
88 | { | 88 | { |
89 | calculateClientArea(); | 89 | calculateClientArea(); |
90 | resizeInnerPane(); | 90 | resizeInnerPane(); |
91 | NeedsUpdate = false; | 91 | NeedsUpdate = false; |
92 | } | 92 | } |
93 | 93 | ||
94 | IGUISkin* skin = Environment->getSkin(); | 94 | IGUISkin* skin = Environment->getSkin(); |
95 | if (Border && skin) | 95 | if (Border && skin) |
96 | { | 96 | { |
97 | skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect ); | 97 | skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect ); |
98 | } | 98 | } |
99 | 99 | ||
100 | IGUIElement::draw(); | 100 | IGUIElement::draw(); |
101 | } | 101 | } |
102 | 102 | ||
103 | void CGUIPanel::addChild(IGUIElement *child) | 103 | void CGUIPanel::addChild(IGUIElement *child) |
104 | { | 104 | { |
105 | // add the child to the inner pane | 105 | // add the child to the inner pane |
106 | InnerPane->addChild(child); | 106 | InnerPane->addChild(child); |
107 | 107 | ||
108 | NeedsUpdate = true; | 108 | NeedsUpdate = true; |
109 | } | 109 | } |
110 | 110 | ||
111 | void CGUIPanel::removeChild(IGUIElement *child) | 111 | void CGUIPanel::removeChild(IGUIElement *child) |
112 | { | 112 | { |
113 | InnerPane->removeChild(child); | 113 | InnerPane->removeChild(child); |
114 | 114 | ||
115 | NeedsUpdate = true; | 115 | NeedsUpdate = true; |
116 | } | 116 | } |
117 | 117 | ||
118 | //! returns children of the inner pane | 118 | //! returns children of the inner pane |
119 | const core::list<IGUIElement*>& CGUIPanel::getChildren() | 119 | const core::list<IGUIElement*>& CGUIPanel::getChildren() |
120 | { | 120 | { |
121 | return InnerPane->getChildren(); | 121 | return InnerPane->getChildren(); |
122 | } | 122 | } |
123 | 123 | ||
124 | bool CGUIPanel::hasBorder() const | 124 | bool CGUIPanel::hasBorder() const |
125 | { | 125 | { |
126 | return Border; | 126 | return Border; |
127 | } | 127 | } |
128 | 128 | ||
129 | void CGUIPanel::setBorder( bool enabled ) | 129 | void CGUIPanel::setBorder( bool enabled ) |
130 | { | 130 | { |
131 | Border = enabled; | 131 | Border = enabled; |
132 | } | 132 | } |
133 | 133 | ||
134 | IGUIScrollBar* CGUIPanel::getVScrollBar() const | 134 | IGUIScrollBar* CGUIPanel::getVScrollBar() const |
135 | { | 135 | { |
136 | return VScrollBar; | 136 | return VScrollBar; |
137 | } | 137 | } |
138 | 138 | ||
139 | IGUIScrollBar* CGUIPanel::getHScrollBar() const | 139 | IGUIScrollBar* CGUIPanel::getHScrollBar() const |
140 | { | 140 | { |
141 | return HScrollBar; | 141 | return HScrollBar; |
142 | } | 142 | } |
143 | 143 | ||
144 | E_SCROLL_BAR_MODE CGUIPanel::getVScrollBarMode() const | 144 | E_SCROLL_BAR_MODE CGUIPanel::getVScrollBarMode() const |
145 | { | 145 | { |
146 | return VScrollBarMode; | 146 | return VScrollBarMode; |
147 | } | 147 | } |
148 | 148 | ||
149 | void CGUIPanel::setVScrollBarMode( E_SCROLL_BAR_MODE mode ) | 149 | void CGUIPanel::setVScrollBarMode( E_SCROLL_BAR_MODE mode ) |
150 | { | 150 | { |
151 | VScrollBarMode = mode; | 151 | VScrollBarMode = mode; |
152 | NeedsUpdate = true; | 152 | NeedsUpdate = true; |
153 | } | 153 | } |
154 | 154 | ||
155 | E_SCROLL_BAR_MODE CGUIPanel::getHScrollBarMode() const | 155 | E_SCROLL_BAR_MODE CGUIPanel::getHScrollBarMode() const |
156 | { | 156 | { |
157 | return HScrollBarMode; | 157 | return HScrollBarMode; |
158 | } | 158 | } |
159 | 159 | ||
160 | void CGUIPanel::setHScrollBarMode(E_SCROLL_BAR_MODE mode) | 160 | void CGUIPanel::setHScrollBarMode(E_SCROLL_BAR_MODE mode) |
161 | { | 161 | { |
162 | HScrollBarMode = mode; | 162 | HScrollBarMode = mode; |
163 | NeedsUpdate = true; | 163 | NeedsUpdate = true; |
164 | } | 164 | } |
165 | 165 | ||
166 | bool CGUIPanel::OnEvent(const SEvent &event) | 166 | bool CGUIPanel::OnEvent(const SEvent &event) |
167 | { | 167 | { |
168 | // Redirect mouse wheel to scrollbar | 168 | // Redirect mouse wheel to scrollbar |
169 | if (event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL) | 169 | if (event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL) |
170 | { | 170 | { |
171 | if (VScrollBar->isVisible()) | 171 | if (VScrollBar->isVisible()) |
172 | { | 172 | { |
173 | Environment->setFocus(VScrollBar); | 173 | Environment->setFocus(VScrollBar); |
174 | VScrollBar->OnEvent(event); | 174 | VScrollBar->OnEvent(event); |
175 | return true; | 175 | return true; |
176 | } | 176 | } |
177 | else if (VScrollBar->isVisible()) | 177 | else if (VScrollBar->isVisible()) |
178 | { | 178 | { |
179 | Environment->setFocus(HScrollBar); | 179 | Environment->setFocus(HScrollBar); |
180 | HScrollBar->OnEvent(event); | 180 | HScrollBar->OnEvent(event); |
181 | return true; | 181 | return true; |
182 | } | 182 | } |
183 | } | 183 | } |
184 | else | 184 | else |
185 | { | 185 | { |
186 | if (event.EventType == EET_GUI_EVENT && event.GUIEvent.EventType == EGET_SCROLL_BAR_CHANGED && | 186 | if (event.EventType == EET_GUI_EVENT && event.GUIEvent.EventType == EGET_SCROLL_BAR_CHANGED && |
187 | (event.GUIEvent.Caller == HScrollBar || event.GUIEvent.Caller == VScrollBar) ) | 187 | (event.GUIEvent.Caller == HScrollBar || event.GUIEvent.Caller == VScrollBar) ) |
188 | { | 188 | { |
189 | moveInnerPane(); | 189 | moveInnerPane(); |
190 | 190 | ||
191 | return true; | 191 | return true; |
192 | } | 192 | } |
193 | } | 193 | } |
194 | 194 | ||
195 | return IGUIElement::OnEvent(event); | 195 | return IGUIElement::OnEvent(event); |
196 | } | 196 | } |
197 | 197 | ||
198 | void CGUIPanel::moveInnerPane() | 198 | void CGUIPanel::moveInnerPane() |
199 | { | 199 | { |
200 | core::dimension2d<s32> dim = InnerPane->getAbsolutePosition().getSize(); | 200 | core::dimension2d<s32> dim = InnerPane->getAbsolutePosition().getSize(); |
201 | core::position2d<s32> newpos(HScrollBar->isVisible() ? -HScrollBar->getPos() : 0 , VScrollBar->isVisible() ? -VScrollBar->getPos() : 0); | 201 | core::position2d<s32> newpos(HScrollBar->isVisible() ? -HScrollBar->getPos() : 0 , VScrollBar->isVisible() ? -VScrollBar->getPos() : 0); |
202 | core::rect<s32> r(newpos, newpos + dim); | 202 | core::rect<s32> r(newpos, newpos + dim); |
203 | InnerPane->setRelativePosition(r); | 203 | InnerPane->setRelativePosition(r); |
204 | } | 204 | } |
205 | 205 | ||
206 | 206 | ||
207 | void CGUIPanel::updateAbsolutePosition() | 207 | void CGUIPanel::updateAbsolutePosition() |
208 | { | 208 | { |
209 | IGUIElement::updateAbsolutePosition(); | 209 | IGUIElement::updateAbsolutePosition(); |
210 | calculateClientArea(); | 210 | calculateClientArea(); |
211 | resizeInnerPane(); | 211 | resizeInnerPane(); |
212 | } | 212 | } |
213 | 213 | ||
214 | 214 | ||
215 | void CGUIPanel::resizeInnerPane() | 215 | void CGUIPanel::resizeInnerPane() |
216 | { | 216 | { |
217 | if (!HScrollBar || !VScrollBar || !InnerPane || !ClipPane) | 217 | if (!HScrollBar || !VScrollBar || !InnerPane || !ClipPane) |
218 | return; | 218 | return; |
219 | 219 | ||
220 | // get outer pane size | 220 | // get outer pane size |
221 | core::rect<s32> outerRect = ClipPane->getRelativePosition(); | 221 | core::rect<s32> outerRect = ClipPane->getRelativePosition(); |
222 | 222 | ||
223 | // resize flexible children depending on outer pane | 223 | // resize flexible children depending on outer pane |
224 | InnerPane->setRelativePosition(outerRect); | 224 | InnerPane->setRelativePosition(outerRect); |
225 | 225 | ||
226 | // get desired size (total size of all children) | 226 | // get desired size (total size of all children) |
227 | core::rect<s32> totalRect(0, 0, 0, 0); | 227 | core::rect<s32> totalRect(0, 0, 0, 0); |
228 | 228 | ||
229 | core::list<IGUIElement*>::ConstIterator it; | 229 | core::list<IGUIElement*>::ConstIterator it; |
230 | 230 | ||
231 | for (it = InnerPane->getChildren().begin(); | 231 | for (it = InnerPane->getChildren().begin(); |
232 | it != InnerPane->getChildren().end(); ++it) | 232 | it != InnerPane->getChildren().end(); ++it) |
233 | { | 233 | { |
234 | core::rect<s32> rct = (*it)->getRelativePosition(); | 234 | core::rect<s32> rct = (*it)->getRelativePosition(); |
235 | totalRect.addInternalPoint(rct.UpperLeftCorner); | 235 | totalRect.addInternalPoint(rct.UpperLeftCorner); |
236 | totalRect.addInternalPoint(rct.LowerRightCorner); | 236 | totalRect.addInternalPoint(rct.LowerRightCorner); |
237 | } | 237 | } |
238 | 238 | ||
239 | // move children if pane needs to grow | 239 | // move children if pane needs to grow |
240 | core::position2di adjustedMovement(0,0); | 240 | core::position2di adjustedMovement(0,0); |
241 | 241 | ||
242 | if (totalRect.UpperLeftCorner.X < 0) | 242 | if (totalRect.UpperLeftCorner.X < 0) |
243 | adjustedMovement.X = -totalRect.UpperLeftCorner.X; | 243 | adjustedMovement.X = -totalRect.UpperLeftCorner.X; |
244 | if (totalRect.UpperLeftCorner.Y < 0) | 244 | if (totalRect.UpperLeftCorner.Y < 0) |
245 | adjustedMovement.Y = -totalRect.UpperLeftCorner.Y; | 245 | adjustedMovement.Y = -totalRect.UpperLeftCorner.Y; |
246 | 246 | ||
247 | if (adjustedMovement.X > 0 || adjustedMovement.Y > 0) | 247 | if (adjustedMovement.X > 0 || adjustedMovement.Y > 0) |
248 | { | 248 | { |
249 | totalRect += adjustedMovement; | 249 | totalRect += adjustedMovement; |
250 | 250 | ||
251 | for (it = InnerPane->getChildren().begin(); | 251 | for (it = InnerPane->getChildren().begin(); |
252 | it != InnerPane->getChildren().end(); ++it ) | 252 | it != InnerPane->getChildren().end(); ++it ) |
253 | { | 253 | { |
254 | (*it)->move(adjustedMovement); | 254 | (*it)->move(adjustedMovement); |
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
258 | // make sure the inner pane is at least as big as the outer | 258 | // make sure the inner pane is at least as big as the outer |
259 | if (totalRect.getWidth() < outerRect.getWidth()) | 259 | if (totalRect.getWidth() < outerRect.getWidth()) |
260 | { | 260 | { |
261 | totalRect.UpperLeftCorner.X = 0; | 261 | totalRect.UpperLeftCorner.X = 0; |
262 | totalRect.LowerRightCorner.X = outerRect.getWidth(); | 262 | totalRect.LowerRightCorner.X = outerRect.getWidth(); |
263 | } | 263 | } |
264 | if (totalRect.getHeight() < outerRect.getHeight()) | 264 | if (totalRect.getHeight() < outerRect.getHeight()) |
265 | { | 265 | { |
266 | totalRect.UpperLeftCorner.Y = 0; | 266 | totalRect.UpperLeftCorner.Y = 0; |
267 | totalRect.LowerRightCorner.Y = outerRect.getHeight(); | 267 | totalRect.LowerRightCorner.Y = outerRect.getHeight(); |
268 | } | 268 | } |
269 | 269 | ||
270 | InnerPane->setRelativePosition(totalRect); | 270 | InnerPane->setRelativePosition(totalRect); |
271 | 271 | ||
272 | // scrollbars | 272 | // scrollbars |
273 | if ( HScrollBarMode != ESBM_ALWAYS_INVISIBLE && | 273 | if ( HScrollBarMode != ESBM_ALWAYS_INVISIBLE && |
274 | (totalRect.getWidth() > outerRect.getWidth() || HScrollBarMode == ESBM_ALWAYS_VISIBLE) ) | 274 | (totalRect.getWidth() > outerRect.getWidth() || HScrollBarMode == ESBM_ALWAYS_VISIBLE) ) |
275 | { | 275 | { |
276 | HScrollBar->setVisible(true); | 276 | HScrollBar->setVisible(true); |
277 | HScrollBar->setMax(totalRect.getWidth() - outerRect.getWidth()); | 277 | HScrollBar->setMax(totalRect.getWidth() - outerRect.getWidth()); |
278 | bringToFront(HScrollBar); | 278 | bringToFront(HScrollBar); |
279 | } | 279 | } |
280 | else | 280 | else |
281 | HScrollBar->setVisible(false); | 281 | HScrollBar->setVisible(false); |
282 | 282 | ||
283 | if ( VScrollBarMode != ESBM_ALWAYS_INVISIBLE && | 283 | if ( VScrollBarMode != ESBM_ALWAYS_INVISIBLE && |
284 | (totalRect.getHeight() > outerRect.getHeight() || VScrollBarMode == ESBM_ALWAYS_VISIBLE) ) | 284 | (totalRect.getHeight() > outerRect.getHeight() || VScrollBarMode == ESBM_ALWAYS_VISIBLE) ) |
285 | { | 285 | { |
286 | VScrollBar->setVisible(true); | 286 | VScrollBar->setVisible(true); |
287 | VScrollBar->setMax(totalRect.getHeight() - outerRect.getHeight()); | 287 | VScrollBar->setMax(totalRect.getHeight() - outerRect.getHeight()); |
288 | bringToFront(VScrollBar); | 288 | bringToFront(VScrollBar); |
289 | } | 289 | } |
290 | else | 290 | else |
291 | VScrollBar->setVisible(false); | 291 | VScrollBar->setVisible(false); |
292 | 292 | ||
293 | // move to adjust for scrollbar pos | 293 | // move to adjust for scrollbar pos |
294 | moveInnerPane(); | 294 | moveInnerPane(); |
295 | } | 295 | } |
296 | 296 | ||
297 | void CGUIPanel::calculateClientArea() | 297 | void CGUIPanel::calculateClientArea() |
298 | { | 298 | { |
299 | core::rect<s32> ClientArea(0,0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight()); | 299 | core::rect<s32> ClientArea(0,0, AbsoluteRect.getWidth(),AbsoluteRect.getHeight()); |
300 | 300 | ||
301 | if (VScrollBar->isVisible()) | 301 | if (VScrollBar->isVisible()) |
302 | ClientArea.LowerRightCorner.X -= VScrollBar->getRelativePosition().getWidth(); | 302 | ClientArea.LowerRightCorner.X -= VScrollBar->getRelativePosition().getWidth(); |
303 | 303 | ||
304 | if (HScrollBar->isVisible()) | 304 | if (HScrollBar->isVisible()) |
305 | ClientArea.LowerRightCorner.Y -= HScrollBar->getRelativePosition().getHeight(); | 305 | ClientArea.LowerRightCorner.Y -= HScrollBar->getRelativePosition().getHeight(); |
306 | 306 | ||
307 | if (Border) | 307 | if (Border) |
308 | { | 308 | { |
309 | ClientArea.UpperLeftCorner += core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); | 309 | ClientArea.UpperLeftCorner += core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); |
310 | ClientArea.LowerRightCorner -= core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); | 310 | ClientArea.LowerRightCorner -= core::position2d<s32>( BORDER_WIDTH, BORDER_WIDTH ); |
311 | } | 311 | } |
312 | 312 | ||
313 | ClipPane->setRelativePosition(ClientArea); | 313 | ClipPane->setRelativePosition(ClientArea); |
314 | } | 314 | } |
315 | 315 | ||
316 | core::rect<s32> CGUIPanel::getClientArea() const | 316 | core::rect<s32> CGUIPanel::getClientArea() const |
317 | { | 317 | { |
318 | return ClipPane->getRelativePosition(); | 318 | return ClipPane->getRelativePosition(); |
319 | } | 319 | } |
320 | 320 | ||
321 | void CGUIPanel::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) | 321 | void CGUIPanel::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) |
322 | { | 322 | { |
323 | IGUIElement::serializeAttributes(out, options); | 323 | IGUIElement::serializeAttributes(out, options); |
324 | 324 | ||
325 | out->addBool("border", Border); | 325 | out->addBool("border", Border); |
326 | out->addEnum("horizontalScrollBar", HScrollBarMode, GUIScrollBarModeNames ); | 326 | out->addEnum("horizontalScrollBar", HScrollBarMode, GUIScrollBarModeNames ); |
327 | out->addEnum("verticalScrollBar", VScrollBarMode, GUIScrollBarModeNames ); | 327 | out->addEnum("verticalScrollBar", VScrollBarMode, GUIScrollBarModeNames ); |
328 | } | 328 | } |
329 | 329 | ||
330 | void CGUIPanel::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) | 330 | void CGUIPanel::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) |
331 | { | 331 | { |
332 | IGUIElement::deserializeAttributes(in, options); | 332 | IGUIElement::deserializeAttributes(in, options); |
333 | 333 | ||
334 | setBorder(in->getAttributeAsBool("border")); | 334 | setBorder(in->getAttributeAsBool("border")); |
335 | setHScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("horizontalScrollBar", GUIScrollBarModeNames)); | 335 | setHScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("horizontalScrollBar", GUIScrollBarModeNames)); |
336 | setVScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("verticalScrollBar", GUIScrollBarModeNames)); | 336 | setVScrollBarMode((E_SCROLL_BAR_MODE)in->getAttributeAsEnumeration("verticalScrollBar", GUIScrollBarModeNames)); |
337 | } | 337 | } |
338 | 338 | ||
339 | } // namespace gui | 339 | } // namespace gui |
340 | } // namespace irr | 340 | } // namespace irr |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h index cb6f79a..87609c9 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIPanel.h | |||
@@ -1,128 +1,128 @@ | |||
1 | // Copyright 2006-2012 Asger Feldthaus | 1 | // Copyright 2006-2012 Asger Feldthaus |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef _C_GUI_PANEL_H_ | 5 | #ifndef _C_GUI_PANEL_H_ |
6 | #define _C_GUI_PANEL_H_ | 6 | #define _C_GUI_PANEL_H_ |
7 | 7 | ||
8 | #include "IGUIElement.h" | 8 | #include "IGUIElement.h" |
9 | #include "EGUIEditTypes.h" | 9 | #include "EGUIEditTypes.h" |
10 | 10 | ||
11 | namespace irr | 11 | namespace irr |
12 | { | 12 | { |
13 | namespace gui | 13 | namespace gui |
14 | { | 14 | { |
15 | 15 | ||
16 | class IGUIScrollBar; | 16 | class IGUIScrollBar; |
17 | class IGUITab; | 17 | class IGUITab; |
18 | 18 | ||
19 | enum E_SCROLL_BAR_MODE | 19 | enum E_SCROLL_BAR_MODE |
20 | { | 20 | { |
21 | //! The scrollbar will only show up when needed. | 21 | //! The scrollbar will only show up when needed. |
22 | ESBM_AUTOMATIC = 0, | 22 | ESBM_AUTOMATIC = 0, |
23 | 23 | ||
24 | //! The scrollbar will never be visible. | 24 | //! The scrollbar will never be visible. |
25 | ESBM_ALWAYS_INVISIBLE, | 25 | ESBM_ALWAYS_INVISIBLE, |
26 | 26 | ||
27 | //! The scrollbar will always the visible. | 27 | //! The scrollbar will always the visible. |
28 | ESBM_ALWAYS_VISIBLE, | 28 | ESBM_ALWAYS_VISIBLE, |
29 | 29 | ||
30 | //! just a count of how many are in this enum | 30 | //! just a count of how many are in this enum |
31 | ESBM_COUNT | 31 | ESBM_COUNT |
32 | }; | 32 | }; |
33 | 33 | ||
34 | const c8* const GUIScrollBarModeNames[] = | 34 | const c8* const GUIScrollBarModeNames[] = |
35 | { | 35 | { |
36 | "automatic", | 36 | "automatic", |
37 | "alwaysInvisible", | 37 | "alwaysInvisible", |
38 | "alwaysVisible", | 38 | "alwaysVisible", |
39 | 0 | 39 | 0 |
40 | }; | 40 | }; |
41 | 41 | ||
42 | class CGUIPanel : public IGUIElement | 42 | class CGUIPanel : public IGUIElement |
43 | { | 43 | { |
44 | public: | 44 | public: |
45 | CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1, | 45 | CGUIPanel( IGUIEnvironment* environment, IGUIElement* parent, s32 id=-1, |
46 | const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100), | 46 | const core::rect<s32>& rectangle = core::rect<s32>(0,0,100,100), |
47 | bool border=false, | 47 | bool border=false, |
48 | E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC, | 48 | E_SCROLL_BAR_MODE vMode=ESBM_AUTOMATIC, |
49 | E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE ); | 49 | E_SCROLL_BAR_MODE hMode=ESBM_ALWAYS_INVISIBLE ); |
50 | 50 | ||
51 | virtual ~CGUIPanel(); | 51 | virtual ~CGUIPanel(); |
52 | 52 | ||
53 | //! draws the panel and its children | 53 | //! draws the panel and its children |
54 | virtual void draw(); | 54 | virtual void draw(); |
55 | 55 | ||
56 | //! returns true if it has a border, false if not | 56 | //! returns true if it has a border, false if not |
57 | bool hasBorder() const; | 57 | bool hasBorder() const; |
58 | 58 | ||
59 | //! sets whether the element draws a border | 59 | //! sets whether the element draws a border |
60 | void setBorder(bool enabled); | 60 | void setBorder(bool enabled); |
61 | 61 | ||
62 | //! returns a pointer to the vertical scrollbar | 62 | //! returns a pointer to the vertical scrollbar |
63 | IGUIScrollBar* getVScrollBar() const; | 63 | IGUIScrollBar* getVScrollBar() const; |
64 | 64 | ||
65 | //! returns a pointer to the horizontal scrollbar | 65 | //! returns a pointer to the horizontal scrollbar |
66 | IGUIScrollBar* getHScrollBar() const; | 66 | IGUIScrollBar* getHScrollBar() const; |
67 | 67 | ||
68 | //! returns the vertical scrollbar visibility rule | 68 | //! returns the vertical scrollbar visibility rule |
69 | E_SCROLL_BAR_MODE getVScrollBarMode() const; | 69 | E_SCROLL_BAR_MODE getVScrollBarMode() const; |
70 | 70 | ||
71 | //! sets the vertical scrollbar visibility rule | 71 | //! sets the vertical scrollbar visibility rule |
72 | void setVScrollBarMode(E_SCROLL_BAR_MODE mode); | 72 | void setVScrollBarMode(E_SCROLL_BAR_MODE mode); |
73 | 73 | ||
74 | //! returns the horizontal scrollbar visibility rule | 74 | //! returns the horizontal scrollbar visibility rule |
75 | E_SCROLL_BAR_MODE getHScrollBarMode() const; | 75 | E_SCROLL_BAR_MODE getHScrollBarMode() const; |
76 | 76 | ||
77 | //! sets the horizontal scrollbar visibility rule | 77 | //! sets the horizontal scrollbar visibility rule |
78 | void setHScrollBarMode(E_SCROLL_BAR_MODE mode); | 78 | void setHScrollBarMode(E_SCROLL_BAR_MODE mode); |
79 | 79 | ||
80 | //! returns the visible area inside the panel, excluding scrollbar and border | 80 | //! returns the visible area inside the panel, excluding scrollbar and border |
81 | core::rect<s32> getClientArea() const; | 81 | core::rect<s32> getClientArea() const; |
82 | 82 | ||
83 | virtual bool OnEvent(const SEvent &event); | 83 | virtual bool OnEvent(const SEvent &event); |
84 | 84 | ||
85 | //! adds a child to the panel | 85 | //! adds a child to the panel |
86 | virtual void addChild(IGUIElement* child); | 86 | virtual void addChild(IGUIElement* child); |
87 | 87 | ||
88 | //! removes a child from the panel | 88 | //! removes a child from the panel |
89 | virtual void removeChild(IGUIElement* child); | 89 | virtual void removeChild(IGUIElement* child); |
90 | 90 | ||
91 | //! updates the absolute position | 91 | //! updates the absolute position |
92 | virtual void updateAbsolutePosition(); | 92 | virtual void updateAbsolutePosition(); |
93 | 93 | ||
94 | //! returns children of the inner pane | 94 | //! returns children of the inner pane |
95 | virtual const core::list<IGUIElement*>& getChildren(); | 95 | virtual const core::list<IGUIElement*>& getChildren(); |
96 | 96 | ||
97 | //! Returns the type name of the gui element. | 97 | //! Returns the type name of the gui element. |
98 | virtual const c8* getTypeName() const | 98 | virtual const c8* getTypeName() const |
99 | { | 99 | { |
100 | return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL]; | 100 | return GUIEditElementTypeNames[EGUIEDIT_GUIPANEL]; |
101 | } | 101 | } |
102 | 102 | ||
103 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); | 103 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0); |
104 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); | 104 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); |
105 | 105 | ||
106 | protected: | 106 | protected: |
107 | void moveInnerPane(); | 107 | void moveInnerPane(); |
108 | void resizeInnerPane(); | 108 | void resizeInnerPane(); |
109 | void calculateClientArea(); | 109 | void calculateClientArea(); |
110 | 110 | ||
111 | private: | 111 | private: |
112 | 112 | ||
113 | IGUIScrollBar* VScrollBar; | 113 | IGUIScrollBar* VScrollBar; |
114 | IGUIScrollBar* HScrollBar; | 114 | IGUIScrollBar* HScrollBar; |
115 | IGUITab* ClipPane; | 115 | IGUITab* ClipPane; |
116 | IGUITab* InnerPane; | 116 | IGUITab* InnerPane; |
117 | 117 | ||
118 | E_SCROLL_BAR_MODE VScrollBarMode; | 118 | E_SCROLL_BAR_MODE VScrollBarMode; |
119 | E_SCROLL_BAR_MODE HScrollBarMode; | 119 | E_SCROLL_BAR_MODE HScrollBarMode; |
120 | 120 | ||
121 | bool NeedsUpdate; | 121 | bool NeedsUpdate; |
122 | bool Border; | 122 | bool Border; |
123 | }; | 123 | }; |
124 | 124 | ||
125 | } // namespace gui | 125 | } // namespace gui |
126 | } // namespace irr | 126 | } // namespace irr |
127 | 127 | ||
128 | #endif | 128 | #endif |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h index af9ac03..36cac56 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUIStringAttribute.h | |||
@@ -1,70 +1,70 @@ | |||
1 | #ifndef __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ | 1 | #ifndef __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ |
2 | #define __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ | 2 | #define __C_GUI_STRING_ATTRIBUTE_H_INCLUDED__ |
3 | 3 | ||
4 | #include "CGUIAttribute.h" | 4 | #include "CGUIAttribute.h" |
5 | #include "IGUIEditBox.h" | 5 | #include "IGUIEditBox.h" |
6 | #include "EGUIEditTypes.h" | 6 | #include "EGUIEditTypes.h" |
7 | 7 | ||
8 | namespace irr | 8 | namespace irr |
9 | { | 9 | { |
10 | namespace gui | 10 | namespace gui |
11 | { | 11 | { |
12 | 12 | ||
13 | class CGUIStringAttribute : public CGUIAttribute | 13 | class CGUIStringAttribute : public CGUIAttribute |
14 | { | 14 | { |
15 | public: | 15 | public: |
16 | // | 16 | // |
17 | CGUIStringAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : | 17 | CGUIStringAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : |
18 | CGUIAttribute(environment, parent, myParentID), | 18 | CGUIAttribute(environment, parent, myParentID), |
19 | AttribEditBox(0) | 19 | AttribEditBox(0) |
20 | { | 20 | { |
21 | core::rect<s32> r = getAbsolutePosition(); | 21 | core::rect<s32> r = getAbsolutePosition(); |
22 | core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, | 22 | core::rect<s32> r2(0, Environment->getSkin()->getFont()->getDimension(L"A").Height + 10, |
23 | r.getWidth() - 5, | 23 | r.getWidth() - 5, |
24 | Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); | 24 | Environment->getSkin()->getFont()->getDimension(L"A").Height*2 + 15 ); |
25 | 25 | ||
26 | AttribEditBox = environment->addEditBox(0, r2, true, this, -1); | 26 | AttribEditBox = environment->addEditBox(0, r2, true, this, -1); |
27 | AttribEditBox->grab(); | 27 | AttribEditBox->grab(); |
28 | AttribEditBox->setSubElement(true); | 28 | AttribEditBox->setSubElement(true); |
29 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 29 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
30 | 30 | ||
31 | } | 31 | } |
32 | 32 | ||
33 | virtual ~CGUIStringAttribute() | 33 | virtual ~CGUIStringAttribute() |
34 | { | 34 | { |
35 | if (AttribEditBox) | 35 | if (AttribEditBox) |
36 | AttribEditBox->drop(); | 36 | AttribEditBox->drop(); |
37 | } | 37 | } |
38 | 38 | ||
39 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) | 39 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) |
40 | { | 40 | { |
41 | AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); | 41 | AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); |
42 | CGUIAttribute::setAttrib(attribs, attribIndex); | 42 | CGUIAttribute::setAttrib(attribs, attribIndex); |
43 | } | 43 | } |
44 | 44 | ||
45 | //! save the attribute and possibly post the event to its parent | 45 | //! save the attribute and possibly post the event to its parent |
46 | virtual bool updateAttrib(bool sendEvent=true) | 46 | virtual bool updateAttrib(bool sendEvent=true) |
47 | { | 47 | { |
48 | if (!Attribs) | 48 | if (!Attribs) |
49 | return true; | 49 | return true; |
50 | 50 | ||
51 | Attribs->setAttribute(Index, AttribEditBox->getText()); | 51 | Attribs->setAttribute(Index, AttribEditBox->getText()); |
52 | AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); | 52 | AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); |
53 | 53 | ||
54 | return CGUIAttribute::updateAttrib(sendEvent); | 54 | return CGUIAttribute::updateAttrib(sendEvent); |
55 | } | 55 | } |
56 | 56 | ||
57 | //! Returns the type name of the gui element. | 57 | //! Returns the type name of the gui element. |
58 | virtual const c8* getTypeName() const | 58 | virtual const c8* getTypeName() const |
59 | { | 59 | { |
60 | return GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE]; | 60 | return GUIEditElementTypeNames[EGUIEDIT_STRINGATTRIBUTE]; |
61 | } | 61 | } |
62 | 62 | ||
63 | private: | 63 | private: |
64 | IGUIEditBox* AttribEditBox; | 64 | IGUIEditBox* AttribEditBox; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | } // namespace gui | 67 | } // namespace gui |
68 | } // namespace irr | 68 | } // namespace irr |
69 | 69 | ||
70 | #endif | 70 | #endif |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h index 6a4fef2..bee43a9 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureAttribute.h | |||
@@ -1,140 +1,140 @@ | |||
1 | #ifndef __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ | 1 | #ifndef __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ |
2 | #define __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ | 2 | #define __C_GUI_TEXTURE_ATTRIBUTE_H_INCLUDED__ |
3 | 3 | ||
4 | #include "CGUIAttribute.h" | 4 | #include "CGUIAttribute.h" |
5 | #include "IGUIEditBox.h" | 5 | #include "IGUIEditBox.h" |
6 | #include "IGUIImage.h" | 6 | #include "IGUIImage.h" |
7 | #include "IGUIButton.h" | 7 | #include "IGUIButton.h" |
8 | #include "EGUIEditTypes.h" | 8 | #include "EGUIEditTypes.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | namespace gui | 12 | namespace gui |
13 | { | 13 | { |
14 | 14 | ||
15 | class CGUITextureAttribute : public CGUIAttribute | 15 | class CGUITextureAttribute : public CGUIAttribute |
16 | { | 16 | { |
17 | public: | 17 | public: |
18 | // | 18 | // |
19 | CGUITextureAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : | 19 | CGUITextureAttribute(IGUIEnvironment* environment, IGUIElement *parent, s32 myParentID) : |
20 | CGUIAttribute(environment, parent, myParentID), | 20 | CGUIAttribute(environment, parent, myParentID), |
21 | AttribEditBox(0), AttribImage(0), AttribButton(0) | 21 | AttribEditBox(0), AttribImage(0), AttribButton(0) |
22 | { | 22 | { |
23 | IGUISkin* skin = Environment->getSkin(); | 23 | IGUISkin* skin = Environment->getSkin(); |
24 | 24 | ||
25 | core::rect<s32> r = getAbsolutePosition(); | 25 | core::rect<s32> r = getAbsolutePosition(); |
26 | s32 topy = skin->getFont()->getDimension(L"A").Height + 10; | 26 | s32 topy = skin->getFont()->getDimension(L"A").Height + 10; |
27 | s32 h = skin->getFont()->getDimension(L"A").Height + 5; | 27 | s32 h = skin->getFont()->getDimension(L"A").Height + 5; |
28 | 28 | ||
29 | AttribImage = environment->addImage(0, core::position2di(0, topy), false, this); | 29 | AttribImage = environment->addImage(0, core::position2di(0, topy), false, this); |
30 | AttribImage->setRelativePosition( core::rect<s32>(0,topy, r.getWidth() - 5, 100+topy)); | 30 | AttribImage->setRelativePosition( core::rect<s32>(0,topy, r.getWidth() - 5, 100+topy)); |
31 | AttribImage->grab(); | 31 | AttribImage->grab(); |
32 | AttribImage->setSubElement(true); | 32 | AttribImage->setSubElement(true); |
33 | AttribImage->setScaleImage(true); | 33 | AttribImage->setScaleImage(true); |
34 | AttribImage->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 34 | AttribImage->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
35 | 35 | ||
36 | topy += 105; | 36 | topy += 105; |
37 | 37 | ||
38 | core::rect<s32> r2(0, topy, r.getWidth() - 15 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy + h); | 38 | core::rect<s32> r2(0, topy, r.getWidth() - 15 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy + h); |
39 | core::rect<s32> br(r.getWidth() - 10 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy, r.getWidth(), topy + h); | 39 | core::rect<s32> br(r.getWidth() - 10 - skin->getSize(EGDS_CHECK_BOX_WIDTH), topy, r.getWidth(), topy + h); |
40 | 40 | ||
41 | AttribEditBox = environment->addEditBox(0, r2, true, this, -1); | 41 | AttribEditBox = environment->addEditBox(0, r2, true, this, -1); |
42 | AttribEditBox->grab(); | 42 | AttribEditBox->grab(); |
43 | AttribEditBox->setSubElement(true); | 43 | AttribEditBox->setSubElement(true); |
44 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 44 | AttribEditBox->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
45 | 45 | ||
46 | AttribButton = environment->addButton(br, this, -1, L"..."); | 46 | AttribButton = environment->addButton(br, this, -1, L"..."); |
47 | AttribButton->grab(); | 47 | AttribButton->grab(); |
48 | AttribButton->setSubElement(true); | 48 | AttribButton->setSubElement(true); |
49 | AttribButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 49 | AttribButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
50 | //AttribButton->setSpriteBank(skin->getSpriteBank()); | 50 | //AttribButton->setSpriteBank(skin->getSpriteBank()); |
51 | //AttribButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL)); | 51 | //AttribButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL)); |
52 | //AttribButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL), true); | 52 | //AttribButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_FILE), skin->getColor(EGDC_WINDOW_SYMBOL), true); |
53 | } | 53 | } |
54 | 54 | ||
55 | virtual ~CGUITextureAttribute() | 55 | virtual ~CGUITextureAttribute() |
56 | { | 56 | { |
57 | if (AttribEditBox) | 57 | if (AttribEditBox) |
58 | AttribEditBox->drop(); | 58 | AttribEditBox->drop(); |
59 | if (AttribImage) | 59 | if (AttribImage) |
60 | AttribImage->drop(); | 60 | AttribImage->drop(); |
61 | if (AttribButton) | 61 | if (AttribButton) |
62 | AttribButton->drop(); | 62 | AttribButton->drop(); |
63 | } | 63 | } |
64 | 64 | ||
65 | virtual bool OnEvent(const SEvent &e) | 65 | virtual bool OnEvent(const SEvent &e) |
66 | { | 66 | { |
67 | 67 | ||
68 | if (IsEnabled) | 68 | if (IsEnabled) |
69 | { | 69 | { |
70 | switch (e.EventType) | 70 | switch (e.EventType) |
71 | { | 71 | { |
72 | case EET_GUI_EVENT: | 72 | case EET_GUI_EVENT: |
73 | switch (e.GUIEvent.EventType) | 73 | switch (e.GUIEvent.EventType) |
74 | { | 74 | { |
75 | case EGET_BUTTON_CLICKED: | 75 | case EGET_BUTTON_CLICKED: |
76 | // button click: open file dialog | 76 | // button click: open file dialog |
77 | if (e.GUIEvent.Caller == AttribButton) | 77 | if (e.GUIEvent.Caller == AttribButton) |
78 | { | 78 | { |
79 | //Environment->addGUIElement("textureBrowser", Environment->getRootGUIElement()); | 79 | //Environment->addGUIElement("textureBrowser", Environment->getRootGUIElement()); |
80 | return true; | 80 | return true; |
81 | } | 81 | } |
82 | break; | 82 | break; |
83 | case EGET_FILE_SELECTED: | 83 | case EGET_FILE_SELECTED: |
84 | // file selected: change editbox value and set event | 84 | // file selected: change editbox value and set event |
85 | 85 | ||
86 | return true; | 86 | return true; |
87 | case EGET_FILE_CHOOSE_DIALOG_CANCELLED: | 87 | case EGET_FILE_CHOOSE_DIALOG_CANCELLED: |
88 | 88 | ||
89 | return true; | 89 | return true; |
90 | default: | 90 | default: |
91 | break; | 91 | break; |
92 | } | 92 | } |
93 | break; | 93 | break; |
94 | case EET_KEY_INPUT_EVENT: | 94 | case EET_KEY_INPUT_EVENT: |
95 | return true; | 95 | return true; |
96 | default: | 96 | default: |
97 | break; | 97 | break; |
98 | } | 98 | } |
99 | } | 99 | } |
100 | return CGUIAttribute::OnEvent(e); | 100 | return CGUIAttribute::OnEvent(e); |
101 | } | 101 | } |
102 | 102 | ||
103 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) | 103 | virtual void setAttrib(io::IAttributes *attribs, u32 attribIndex) |
104 | { | 104 | { |
105 | AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); | 105 | AttribEditBox->setText(attribs->getAttributeAsStringW(attribIndex).c_str()); |
106 | AttribImage->setImage(attribs->getAttributeAsTexture(Index)); | 106 | AttribImage->setImage(attribs->getAttributeAsTexture(Index)); |
107 | 107 | ||
108 | CGUIAttribute::setAttrib(attribs, attribIndex); | 108 | CGUIAttribute::setAttrib(attribs, attribIndex); |
109 | } | 109 | } |
110 | 110 | ||
111 | //! save the attribute and possibly post the event to its parent | 111 | //! save the attribute and possibly post the event to its parent |
112 | virtual bool updateAttrib(bool sendEvent=true) | 112 | virtual bool updateAttrib(bool sendEvent=true) |
113 | { | 113 | { |
114 | if (!Attribs) | 114 | if (!Attribs) |
115 | return true; | 115 | return true; |
116 | 116 | ||
117 | Attribs->setAttribute(Index, AttribEditBox->getText()); | 117 | Attribs->setAttribute(Index, AttribEditBox->getText()); |
118 | core::stringw tmp = Attribs->getAttributeAsStringW(Index); | 118 | core::stringw tmp = Attribs->getAttributeAsStringW(Index); |
119 | AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); | 119 | AttribEditBox->setText(Attribs->getAttributeAsStringW(Index).c_str()); |
120 | AttribImage->setImage(Attribs->getAttributeAsTexture(Index)); | 120 | AttribImage->setImage(Attribs->getAttributeAsTexture(Index)); |
121 | 121 | ||
122 | return CGUIAttribute::updateAttrib(sendEvent); | 122 | return CGUIAttribute::updateAttrib(sendEvent); |
123 | } | 123 | } |
124 | 124 | ||
125 | //! Returns the type name of the gui element. | 125 | //! Returns the type name of the gui element. |
126 | virtual const c8* getTypeName() const | 126 | virtual const c8* getTypeName() const |
127 | { | 127 | { |
128 | return GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE]; | 128 | return GUIEditElementTypeNames[EGUIEDIT_TEXTUREATTRIBUTE]; |
129 | } | 129 | } |
130 | 130 | ||
131 | private: | 131 | private: |
132 | IGUIEditBox* AttribEditBox; | 132 | IGUIEditBox* AttribEditBox; |
133 | IGUIImage* AttribImage; | 133 | IGUIImage* AttribImage; |
134 | IGUIButton* AttribButton; | 134 | IGUIButton* AttribButton; |
135 | }; | 135 | }; |
136 | 136 | ||
137 | } // namespace gui | 137 | } // namespace gui |
138 | } // namespace irr | 138 | } // namespace irr |
139 | 139 | ||
140 | #endif | 140 | #endif |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp index bac5233..6c80626 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.cpp | |||
@@ -1,336 +1,336 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #include "CGUITextureCacheBrowser.h" | 5 | #include "CGUITextureCacheBrowser.h" |
6 | #include "IGUIEnvironment.h" | 6 | #include "IGUIEnvironment.h" |
7 | #include "IGUIButton.h" | 7 | #include "IGUIButton.h" |
8 | #include "IGUISkin.h" | 8 | #include "IGUISkin.h" |
9 | #include "IGUIFont.h" | 9 | #include "IGUIFont.h" |
10 | #include "IVideoDriver.h" | 10 | #include "IVideoDriver.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace gui | 14 | namespace gui |
15 | { | 15 | { |
16 | 16 | ||
17 | CGUITextureCacheBrowser::CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id, IGUIElement *parent) | 17 | CGUITextureCacheBrowser::CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id, IGUIElement *parent) |
18 | : IGUIWindow(environment, parent, id, core::rect<s32>(0,0,300,200)), | 18 | : IGUIWindow(environment, parent, id, core::rect<s32>(0,0,300,200)), |
19 | CloseButton(0), Panel(0), SelectedTexture(-1), Dragging(false), IsDraggable(true) | 19 | CloseButton(0), Panel(0), SelectedTexture(-1), Dragging(false), IsDraggable(true) |
20 | { | 20 | { |
21 | #ifdef _DEBUG | 21 | #ifdef _DEBUG |
22 | setDebugName("CGUITextureCacheBrowser"); | 22 | setDebugName("CGUITextureCacheBrowser"); |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | IGUISkin* skin = 0; | 25 | IGUISkin* skin = 0; |
26 | IGUISpriteBank* sprites = 0; | 26 | IGUISpriteBank* sprites = 0; |
27 | video::SColor color(255,255,255,255); | 27 | video::SColor color(255,255,255,255); |
28 | 28 | ||
29 | if (environment) | 29 | if (environment) |
30 | skin = environment->getSkin(); | 30 | skin = environment->getSkin(); |
31 | 31 | ||
32 | s32 buttonw = 15; | 32 | s32 buttonw = 15; |
33 | if (skin) | 33 | if (skin) |
34 | { | 34 | { |
35 | buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); | 35 | buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH); |
36 | sprites = skin->getSpriteBank(); | 36 | sprites = skin->getSpriteBank(); |
37 | color = skin->getColor(EGDC_WINDOW_SYMBOL); | 37 | color = skin->getColor(EGDC_WINDOW_SYMBOL); |
38 | } | 38 | } |
39 | s32 posx = RelativeRect.getWidth() - buttonw - 4; | 39 | s32 posx = RelativeRect.getWidth() - buttonw - 4; |
40 | 40 | ||
41 | CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, | 41 | CloseButton = Environment->addButton(core::rect<s32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1, |
42 | L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" ); | 42 | L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close" ); |
43 | CloseButton->setSubElement(true); | 43 | CloseButton->setSubElement(true); |
44 | CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); | 44 | CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT); |
45 | if (sprites) | 45 | if (sprites) |
46 | { | 46 | { |
47 | CloseButton->setSpriteBank(sprites); | 47 | CloseButton->setSpriteBank(sprites); |
48 | CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); | 48 | CloseButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_WINDOW_CLOSE), color); |
49 | CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color); | 49 | CloseButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_WINDOW_CLOSE), color); |
50 | } | 50 | } |
51 | 51 | ||
52 | CloseButton->grab(); | 52 | CloseButton->grab(); |
53 | 53 | ||
54 | // window title | 54 | // window title |
55 | Text = L"Texture Browser"; | 55 | Text = L"Texture Browser"; |
56 | 56 | ||
57 | // panel element | 57 | // panel element |
58 | Panel = new CGUIPanel(environment, this); | 58 | Panel = new CGUIPanel(environment, this); |
59 | Panel->setRelativePosition( core::rect<s32>(1, buttonw + 5, 151, RelativeRect.getHeight() - 1)); | 59 | Panel->setRelativePosition( core::rect<s32>(1, buttonw + 5, 151, RelativeRect.getHeight() - 1)); |
60 | Panel->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); | 60 | Panel->setAlignment(EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT); |
61 | Panel->setBorder(true); | 61 | Panel->setBorder(true); |
62 | Panel->setSubElement(true); | 62 | Panel->setSubElement(true); |
63 | 63 | ||
64 | // some buttons | 64 | // some buttons |
65 | 65 | ||
66 | 66 | ||
67 | // add images from texture cache | 67 | // add images from texture cache |
68 | updateImageList(); | 68 | updateImageList(); |
69 | 69 | ||
70 | } | 70 | } |
71 | 71 | ||
72 | CGUITextureCacheBrowser::~CGUITextureCacheBrowser() | 72 | CGUITextureCacheBrowser::~CGUITextureCacheBrowser() |
73 | { | 73 | { |
74 | if (CloseButton) | 74 | if (CloseButton) |
75 | CloseButton->drop(); | 75 | CloseButton->drop(); |
76 | if (Panel) | 76 | if (Panel) |
77 | Panel->drop(); | 77 | Panel->drop(); |
78 | 78 | ||
79 | // drop images | 79 | // drop images |
80 | u32 i; | 80 | u32 i; |
81 | for (i=0; i<Images.size(); ++i) | 81 | for (i=0; i<Images.size(); ++i) |
82 | { | 82 | { |
83 | Images[i]->drop(); | 83 | Images[i]->drop(); |
84 | Images[i]->remove(); | 84 | Images[i]->remove(); |
85 | } | 85 | } |
86 | Images.clear(); | 86 | Images.clear(); |
87 | } | 87 | } |
88 | void CGUITextureCacheBrowser::updateImageList() | 88 | void CGUITextureCacheBrowser::updateImageList() |
89 | { | 89 | { |
90 | if (!Panel) | 90 | if (!Panel) |
91 | return; | 91 | return; |
92 | 92 | ||
93 | video::IVideoDriver* Driver = Environment->getVideoDriver(); | 93 | video::IVideoDriver* Driver = Environment->getVideoDriver(); |
94 | 94 | ||
95 | // clear images | 95 | // clear images |
96 | u32 i; | 96 | u32 i; |
97 | for (i=0; i<Images.size(); ++i) | 97 | for (i=0; i<Images.size(); ++i) |
98 | { | 98 | { |
99 | Images[i]->drop(); | 99 | Images[i]->drop(); |
100 | Images[i]->remove(); | 100 | Images[i]->remove(); |
101 | } | 101 | } |
102 | Images.clear(); | 102 | Images.clear(); |
103 | 103 | ||
104 | u32 count = (u32)Driver->getTextureCount(); | 104 | u32 count = (u32)Driver->getTextureCount(); |
105 | 105 | ||
106 | s32 h = Panel->getClientArea().getWidth()-10; | 106 | s32 h = Panel->getClientArea().getWidth()-10; |
107 | s32 hw = h/2; | 107 | s32 hw = h/2; |
108 | core::rect<s32> pos(Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X - hw, 5, | 108 | core::rect<s32> pos(Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X - hw, 5, |
109 | Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X + hw, h+5); | 109 | Panel->getClientArea().getCenter().X - Panel->getAbsolutePosition().UpperLeftCorner.X + hw, h+5); |
110 | 110 | ||
111 | core::position2di moveDist(0, h+5); | 111 | core::position2di moveDist(0, h+5); |
112 | 112 | ||
113 | for (u32 i=0; i<count; ++i) | 113 | for (u32 i=0; i<count; ++i) |
114 | { | 114 | { |
115 | core::stringw details; | 115 | core::stringw details; |
116 | video::ITexture* tex = Driver->getTextureByIndex(i); | 116 | video::ITexture* tex = Driver->getTextureByIndex(i); |
117 | details = L"File name: "; | 117 | details = L"File name: "; |
118 | details += tex->getName(); | 118 | details += tex->getName(); |
119 | details += L"\nFormat: "; | 119 | details += L"\nFormat: "; |
120 | video::ECOLOR_FORMAT cf = tex->getColorFormat(); | 120 | video::ECOLOR_FORMAT cf = tex->getColorFormat(); |
121 | 121 | ||
122 | bool alpha = false; | 122 | bool alpha = false; |
123 | 123 | ||
124 | switch (cf) | 124 | switch (cf) |
125 | { | 125 | { |
126 | case video::ECF_A1R5G5B5: | 126 | case video::ECF_A1R5G5B5: |
127 | details += L"A1R5G5B5 (16-bit with 1-bit alpha channel)\n"; | 127 | details += L"A1R5G5B5 (16-bit with 1-bit alpha channel)\n"; |
128 | alpha = true; | 128 | alpha = true; |
129 | break; | 129 | break; |
130 | case video::ECF_R5G6B5: | 130 | case video::ECF_R5G6B5: |
131 | details += L"R5G6B5 (16-bit, no alpha channel)\n"; | 131 | details += L"R5G6B5 (16-bit, no alpha channel)\n"; |
132 | break; | 132 | break; |
133 | case video::ECF_R8G8B8: | 133 | case video::ECF_R8G8B8: |
134 | details += L"R8G8B8 (16-bit, no alpha channel)\n"; | 134 | details += L"R8G8B8 (16-bit, no alpha channel)\n"; |
135 | break; | 135 | break; |
136 | case video::ECF_A8R8G8B8: | 136 | case video::ECF_A8R8G8B8: |
137 | details += L"R8G8B8 (32-bit with 8-bit alpha channel)\n"; | 137 | details += L"R8G8B8 (32-bit with 8-bit alpha channel)\n"; |
138 | alpha = true; | 138 | alpha = true; |
139 | break; | 139 | break; |
140 | default: | 140 | default: |
141 | details += L"Unknown\n"; | 141 | details += L"Unknown\n"; |
142 | } | 142 | } |
143 | 143 | ||
144 | core::dimension2du osize = tex->getOriginalSize(); | 144 | core::dimension2du osize = tex->getOriginalSize(); |
145 | core::dimension2du size = tex->getOriginalSize(); | 145 | core::dimension2du size = tex->getOriginalSize(); |
146 | 146 | ||
147 | details += "Size: "; | 147 | details += "Size: "; |
148 | details += size.Width; | 148 | details += size.Width; |
149 | details += "x"; | 149 | details += "x"; |
150 | details += size.Height; | 150 | details += size.Height; |
151 | 151 | ||
152 | if (osize != size) | 152 | if (osize != size) |
153 | { | 153 | { |
154 | details += "\nOriginal Size: "; | 154 | details += "\nOriginal Size: "; |
155 | details += osize.Width; | 155 | details += osize.Width; |
156 | details += "x"; | 156 | details += "x"; |
157 | details += osize.Height; | 157 | details += osize.Height; |
158 | } | 158 | } |
159 | 159 | ||
160 | details += L"\nMip-maps: "; | 160 | details += L"\nMip-maps: "; |
161 | 161 | ||
162 | if (tex->hasMipMaps()) | 162 | if (tex->hasMipMaps()) |
163 | details += L"Yes\n"; | 163 | details += L"Yes\n"; |
164 | else | 164 | else |
165 | details += L"No\n"; | 165 | details += L"No\n"; |
166 | 166 | ||
167 | IGUIImage* img = Environment->addImage(tex, core::position2di(1,1), alpha, Panel, i); | 167 | IGUIImage* img = Environment->addImage(tex, core::position2di(1,1), alpha, Panel, i); |
168 | img->grab(); | 168 | img->grab(); |
169 | Images.push_back(img); | 169 | Images.push_back(img); |
170 | img->setRelativePosition(pos); | 170 | img->setRelativePosition(pos); |
171 | img->setToolTipText(details.c_str()); | 171 | img->setToolTipText(details.c_str()); |
172 | img->setScaleImage(true); | 172 | img->setScaleImage(true); |
173 | img->setColor( SelectedTexture == (s32)i ? video::SColor(255,255,255,255) : video::SColor(128,128,128,128) ); | 173 | img->setColor( SelectedTexture == (s32)i ? video::SColor(255,255,255,255) : video::SColor(128,128,128,128) ); |
174 | 174 | ||
175 | pos = pos + moveDist; | 175 | pos = pos + moveDist; |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | void CGUITextureCacheBrowser::updateAbsolutePosition() | 179 | void CGUITextureCacheBrowser::updateAbsolutePosition() |
180 | { | 180 | { |
181 | IGUIWindow::updateAbsolutePosition(); | 181 | IGUIWindow::updateAbsolutePosition(); |
182 | updateImageList(); | 182 | updateImageList(); |
183 | } | 183 | } |
184 | 184 | ||
185 | //! called if an event happened. | 185 | //! called if an event happened. |
186 | bool CGUITextureCacheBrowser::OnEvent(const SEvent &event) | 186 | bool CGUITextureCacheBrowser::OnEvent(const SEvent &event) |
187 | { | 187 | { |
188 | switch(event.EventType) | 188 | switch(event.EventType) |
189 | { | 189 | { |
190 | case EET_GUI_EVENT: | 190 | case EET_GUI_EVENT: |
191 | if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) | 191 | if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) |
192 | { | 192 | { |
193 | if (event.GUIEvent.Caller == (IGUIElement*)this) | 193 | if (event.GUIEvent.Caller == (IGUIElement*)this) |
194 | Dragging = false; | 194 | Dragging = false; |
195 | return true; | 195 | return true; |
196 | } | 196 | } |
197 | else | 197 | else |
198 | if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) | 198 | if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED) |
199 | { | 199 | { |
200 | if (event.GUIEvent.Caller == CloseButton) | 200 | if (event.GUIEvent.Caller == CloseButton) |
201 | { | 201 | { |
202 | remove(); | 202 | remove(); |
203 | return true; | 203 | return true; |
204 | } | 204 | } |
205 | } | 205 | } |
206 | break; | 206 | break; |
207 | case EET_MOUSE_INPUT_EVENT: | 207 | case EET_MOUSE_INPUT_EVENT: |
208 | switch(event.MouseInput.Event) | 208 | switch(event.MouseInput.Event) |
209 | { | 209 | { |
210 | case EMIE_LMOUSE_PRESSED_DOWN: | 210 | case EMIE_LMOUSE_PRESSED_DOWN: |
211 | DragStart.X = event.MouseInput.X; | 211 | DragStart.X = event.MouseInput.X; |
212 | DragStart.Y = event.MouseInput.Y; | 212 | DragStart.Y = event.MouseInput.Y; |
213 | 213 | ||
214 | if (getElementFromPoint(DragStart) == this) | 214 | if (getElementFromPoint(DragStart) == this) |
215 | { | 215 | { |
216 | if (!Environment->hasFocus(this)) | 216 | if (!Environment->hasFocus(this)) |
217 | { | 217 | { |
218 | Dragging = IsDraggable; | 218 | Dragging = IsDraggable; |
219 | //Environment->setFocus(this); | 219 | //Environment->setFocus(this); |
220 | if (Parent) | 220 | if (Parent) |
221 | Parent->bringToFront(this); | 221 | Parent->bringToFront(this); |
222 | } | 222 | } |
223 | return true; | 223 | return true; |
224 | } | 224 | } |
225 | else | 225 | else |
226 | { | 226 | { |
227 | if (Panel->getAbsolutePosition().isPointInside(DragStart)) | 227 | if (Panel->getAbsolutePosition().isPointInside(DragStart)) |
228 | { | 228 | { |
229 | // select an image | 229 | // select an image |
230 | IGUIElement* el = Panel->getElementFromPoint(DragStart); | 230 | IGUIElement* el = Panel->getElementFromPoint(DragStart); |
231 | if (el && el != Panel) | 231 | if (el && el != Panel) |
232 | { | 232 | { |
233 | if (el->getType() == EGUIET_IMAGE) | 233 | if (el->getType() == EGUIET_IMAGE) |
234 | { | 234 | { |
235 | setSelected(el->getID()); | 235 | setSelected(el->getID()); |
236 | } | 236 | } |
237 | } | 237 | } |
238 | else | 238 | else |
239 | { | 239 | { |
240 | setSelected(); | 240 | setSelected(); |
241 | } | 241 | } |
242 | } | 242 | } |
243 | } | 243 | } |
244 | break; | 244 | break; |
245 | case EMIE_LMOUSE_LEFT_UP: | 245 | case EMIE_LMOUSE_LEFT_UP: |
246 | Dragging = false; | 246 | Dragging = false; |
247 | //Environment->removeFocus(this); | 247 | //Environment->removeFocus(this); |
248 | return true; | 248 | return true; |
249 | case EMIE_MOUSE_MOVED: | 249 | case EMIE_MOUSE_MOVED: |
250 | if (Dragging) | 250 | if (Dragging) |
251 | { | 251 | { |
252 | // gui window should not be dragged outside its parent | 252 | // gui window should not be dragged outside its parent |
253 | if (Parent) | 253 | if (Parent) |
254 | if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || | 254 | if (event.MouseInput.X < Parent->getAbsolutePosition().UpperLeftCorner.X +1 || |
255 | event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || | 255 | event.MouseInput.Y < Parent->getAbsolutePosition().UpperLeftCorner.Y +1 || |
256 | event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || | 256 | event.MouseInput.X > Parent->getAbsolutePosition().LowerRightCorner.X -1 || |
257 | event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) | 257 | event.MouseInput.Y > Parent->getAbsolutePosition().LowerRightCorner.Y -1) |
258 | 258 | ||
259 | return true; | 259 | return true; |
260 | 260 | ||
261 | 261 | ||
262 | move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); | 262 | move(core::position2d<s32>(event.MouseInput.X - DragStart.X, event.MouseInput.Y - DragStart.Y)); |
263 | DragStart.X = event.MouseInput.X; | 263 | DragStart.X = event.MouseInput.X; |
264 | DragStart.Y = event.MouseInput.Y; | 264 | DragStart.Y = event.MouseInput.Y; |
265 | return true; | 265 | return true; |
266 | } | 266 | } |
267 | break; | 267 | break; |
268 | default: | 268 | default: |
269 | break; | 269 | break; |
270 | } | 270 | } |
271 | default: | 271 | default: |
272 | break; | 272 | break; |
273 | } | 273 | } |
274 | 274 | ||
275 | return Parent ? Parent->OnEvent(event) : false; | 275 | return Parent ? Parent->OnEvent(event) : false; |
276 | } | 276 | } |
277 | 277 | ||
278 | void CGUITextureCacheBrowser::setSelected(s32 index) | 278 | void CGUITextureCacheBrowser::setSelected(s32 index) |
279 | { | 279 | { |
280 | SelectedTexture = index; | 280 | SelectedTexture = index; |
281 | updateImageList(); | 281 | updateImageList(); |
282 | printf("Texture %d selected\n", index); | 282 | printf("Texture %d selected\n", index); |
283 | } | 283 | } |
284 | 284 | ||
285 | void CGUITextureCacheBrowser::draw() | 285 | void CGUITextureCacheBrowser::draw() |
286 | { | 286 | { |
287 | if (!IsVisible) | 287 | if (!IsVisible) |
288 | return; | 288 | return; |
289 | 289 | ||
290 | IGUISkin* skin = Environment->getSkin(); | 290 | IGUISkin* skin = Environment->getSkin(); |
291 | 291 | ||
292 | core::rect<s32> rect = AbsoluteRect; | 292 | core::rect<s32> rect = AbsoluteRect; |
293 | core::rect<s32> *cl = &AbsoluteClippingRect; | 293 | core::rect<s32> *cl = &AbsoluteClippingRect; |
294 | 294 | ||
295 | // draw body fast | 295 | // draw body fast |
296 | rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), | 296 | rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER), |
297 | AbsoluteRect, &AbsoluteClippingRect); | 297 | AbsoluteRect, &AbsoluteClippingRect); |
298 | 298 | ||
299 | // draw window text | 299 | // draw window text |
300 | if (Text.size()) | 300 | if (Text.size()) |
301 | { | 301 | { |
302 | rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); | 302 | rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X); |
303 | rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); | 303 | rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y); |
304 | rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; | 304 | rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5; |
305 | 305 | ||
306 | IGUIFont* font = skin->getFont(); | 306 | IGUIFont* font = skin->getFont(); |
307 | if (font) | 307 | if (font) |
308 | font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, cl); | 308 | font->draw(Text.c_str(), rect, skin->getColor(EGDC_ACTIVE_CAPTION), false, true, cl); |
309 | } | 309 | } |
310 | 310 | ||
311 | IGUIElement::draw(); | 311 | IGUIElement::draw(); |
312 | } | 312 | } |
313 | 313 | ||
314 | 314 | ||
315 | bool CGUITextureCacheBrowser::isDraggable() const | 315 | bool CGUITextureCacheBrowser::isDraggable() const |
316 | { | 316 | { |
317 | return IsDraggable; | 317 | return IsDraggable; |
318 | } | 318 | } |
319 | 319 | ||
320 | void CGUITextureCacheBrowser::setDraggable(bool draggable) | 320 | void CGUITextureCacheBrowser::setDraggable(bool draggable) |
321 | { | 321 | { |
322 | IsDraggable = draggable; | 322 | IsDraggable = draggable; |
323 | 323 | ||
324 | if (Dragging && !IsDraggable) | 324 | if (Dragging && !IsDraggable) |
325 | Dragging = false; | 325 | Dragging = false; |
326 | } | 326 | } |
327 | 327 | ||
328 | 328 | ||
329 | //! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) | 329 | //! Returns the rectangle of the drawable area (without border, without titlebar and without scrollbars) |
330 | core::rect<s32> CGUITextureCacheBrowser::getClientRect() const | 330 | core::rect<s32> CGUITextureCacheBrowser::getClientRect() const |
331 | { | 331 | { |
332 | return core::recti(); | 332 | return core::recti(); |
333 | } | 333 | } |
334 | 334 | ||
335 | } // namespace gui | 335 | } // namespace gui |
336 | } // namespace irr | 336 | } // namespace irr |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h index 108d4d6..afe84f1 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CGUITextureCacheBrowser.h | |||
@@ -1,88 +1,88 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt / Gaz Davidson |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ | 5 | #ifndef __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ |
6 | #define __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ | 6 | #define __C_GUI_TEXTURE_CACHE_BROWSER_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IGUIWindow.h" | 8 | #include "IGUIWindow.h" |
9 | #include "CGUIPanel.h" | 9 | #include "CGUIPanel.h" |
10 | #include "IGUIImage.h" | 10 | #include "IGUIImage.h" |
11 | #include "EGUIEditTypes.h" | 11 | #include "EGUIEditTypes.h" |
12 | 12 | ||
13 | namespace irr | 13 | namespace irr |
14 | { | 14 | { |
15 | namespace gui | 15 | namespace gui |
16 | { | 16 | { |
17 | 17 | ||
18 | //! Texture cache browser | 18 | //! Texture cache browser |
19 | 19 | ||
20 | const u32 TEXTURE_BROWSER_TEXTURE_SELECTED = 0x5E1EC7ED; // custom event number for texture selected | 20 | const u32 TEXTURE_BROWSER_TEXTURE_SELECTED = 0x5E1EC7ED; // custom event number for texture selected |
21 | 21 | ||
22 | class CGUITextureCacheBrowser : public IGUIWindow | 22 | class CGUITextureCacheBrowser : public IGUIWindow |
23 | { | 23 | { |
24 | public: | 24 | public: |
25 | 25 | ||
26 | //! constructor | 26 | //! constructor |
27 | CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); | 27 | CGUITextureCacheBrowser(IGUIEnvironment* environment, s32 id=-1, IGUIElement *parent=0); |
28 | 28 | ||
29 | //! destructor | 29 | //! destructor |
30 | ~CGUITextureCacheBrowser(); | 30 | ~CGUITextureCacheBrowser(); |
31 | 31 | ||
32 | //! event handler | 32 | //! event handler |
33 | virtual bool OnEvent(const SEvent &event); | 33 | virtual bool OnEvent(const SEvent &event); |
34 | 34 | ||
35 | //! draws the element | 35 | //! draws the element |
36 | virtual void draw(); | 36 | virtual void draw(); |
37 | 37 | ||
38 | //! update absolute position | 38 | //! update absolute position |
39 | virtual void updateAbsolutePosition(); | 39 | virtual void updateAbsolutePosition(); |
40 | 40 | ||
41 | //! this shoudln't be serialized, but this is included as it's an example | 41 | //! this shoudln't be serialized, but this is included as it's an example |
42 | virtual const c8* getTypeName() const { return "textureCacheBrowser"; } | 42 | virtual const c8* getTypeName() const { return "textureCacheBrowser"; } |
43 | 43 | ||
44 | //! Returns pointer to the close button | 44 | //! Returns pointer to the close button |
45 | virtual IGUIButton* getCloseButton() const { return CloseButton; } | 45 | virtual IGUIButton* getCloseButton() const { return CloseButton; } |
46 | 46 | ||
47 | //! Returns pointer to the minimize button | 47 | //! Returns pointer to the minimize button |
48 | virtual IGUIButton* getMinimizeButton() const { return 0;} | 48 | virtual IGUIButton* getMinimizeButton() const { return 0;} |
49 | 49 | ||
50 | //! Returns pointer to the maximize button | 50 | //! Returns pointer to the maximize button |
51 | virtual IGUIButton* getMaximizeButton() const { return 0;} | 51 | virtual IGUIButton* getMaximizeButton() const { return 0;} |
52 | 52 | ||
53 | //! get draggable | 53 | //! get draggable |
54 | virtual bool isDraggable() const; | 54 | virtual bool isDraggable() const; |
55 | 55 | ||
56 | //! get draggable | 56 | //! get draggable |
57 | virtual void setDraggable(bool draggable); | 57 | virtual void setDraggable(bool draggable); |
58 | 58 | ||
59 | //! not used | 59 | //! not used |
60 | virtual core::rect<s32> getClientRect() const; | 60 | virtual core::rect<s32> getClientRect() const; |
61 | virtual void setDrawBackground(bool draw) { } | 61 | virtual void setDrawBackground(bool draw) { } |
62 | virtual bool getDrawBackground() const { return true; } | 62 | virtual bool getDrawBackground() const { return true; } |
63 | virtual void setDrawTitlebar(bool draw) { } | 63 | virtual void setDrawTitlebar(bool draw) { } |
64 | virtual bool getDrawTitlebar() const { return true; } | 64 | virtual bool getDrawTitlebar() const { return true; } |
65 | 65 | ||
66 | 66 | ||
67 | void setSelected(s32 index=-1); | 67 | void setSelected(s32 index=-1); |
68 | 68 | ||
69 | private: | 69 | private: |
70 | 70 | ||
71 | void updateImageList(); | 71 | void updateImageList(); |
72 | 72 | ||
73 | core::array<IGUIImage*> Images; | 73 | core::array<IGUIImage*> Images; |
74 | core::position2d<s32> DragStart; | 74 | core::position2d<s32> DragStart; |
75 | 75 | ||
76 | IGUIButton* CloseButton; | 76 | IGUIButton* CloseButton; |
77 | CGUIPanel* Panel; | 77 | CGUIPanel* Panel; |
78 | s32 SelectedTexture; | 78 | s32 SelectedTexture; |
79 | bool Dragging; | 79 | bool Dragging; |
80 | bool IsDraggable; | 80 | bool IsDraggable; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | 83 | ||
84 | } // end namespace gui | 84 | } // end namespace gui |
85 | } // end namespace irr | 85 | } // end namespace irr |
86 | 86 | ||
87 | #endif | 87 | #endif |
88 | 88 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp index 0a69587..af46b15 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.cpp | |||
@@ -1,95 +1,95 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #include "CMemoryReadWriteFile.h" | 5 | #include "CMemoryReadWriteFile.h" |
6 | 6 | ||
7 | using namespace irr; | 7 | using namespace irr; |
8 | using namespace io; | 8 | using namespace io; |
9 | 9 | ||
10 | CMemoryReadWriteFile::CMemoryReadWriteFile(const c8* filename) | 10 | CMemoryReadWriteFile::CMemoryReadWriteFile(const c8* filename) |
11 | : Data(), FileName(filename), Pos(0) | 11 | : Data(), FileName(filename), Pos(0) |
12 | { | 12 | { |
13 | } | 13 | } |
14 | 14 | ||
15 | 15 | ||
16 | s32 CMemoryReadWriteFile::write(const void* buffer, u32 sizeToWrite) | 16 | s32 CMemoryReadWriteFile::write(const void* buffer, u32 sizeToWrite) |
17 | { | 17 | { |
18 | // no point in writing 0 bytes | 18 | // no point in writing 0 bytes |
19 | if (sizeToWrite < 1) | 19 | if (sizeToWrite < 1) |
20 | return 0; | 20 | return 0; |
21 | 21 | ||
22 | // expand size | 22 | // expand size |
23 | if (Pos + sizeToWrite > Data.size()) | 23 | if (Pos + sizeToWrite > Data.size()) |
24 | Data.set_used(Pos+sizeToWrite); | 24 | Data.set_used(Pos+sizeToWrite); |
25 | 25 | ||
26 | // copy data | 26 | // copy data |
27 | memcpy( (void*) &Data[Pos], buffer, (size_t) sizeToWrite); | 27 | memcpy( (void*) &Data[Pos], buffer, (size_t) sizeToWrite); |
28 | 28 | ||
29 | Pos += sizeToWrite; | 29 | Pos += sizeToWrite; |
30 | 30 | ||
31 | return sizeToWrite; | 31 | return sizeToWrite; |
32 | 32 | ||
33 | } | 33 | } |
34 | 34 | ||
35 | bool CMemoryReadWriteFile::seek(long finalPos, bool relativeMovement) | 35 | bool CMemoryReadWriteFile::seek(long finalPos, bool relativeMovement) |
36 | { | 36 | { |
37 | if (relativeMovement) | 37 | if (relativeMovement) |
38 | { | 38 | { |
39 | if (finalPos + Pos < 0) | 39 | if (finalPos + Pos < 0) |
40 | return 0; | 40 | return 0; |
41 | else | 41 | else |
42 | Pos += finalPos; | 42 | Pos += finalPos; |
43 | } | 43 | } |
44 | else | 44 | else |
45 | { | 45 | { |
46 | Pos = finalPos; | 46 | Pos = finalPos; |
47 | } | 47 | } |
48 | 48 | ||
49 | if (Pos > (s32)Data.size()) | 49 | if (Pos > (s32)Data.size()) |
50 | Data.set_used(Pos+1); | 50 | Data.set_used(Pos+1); |
51 | 51 | ||
52 | return true; | 52 | return true; |
53 | 53 | ||
54 | } | 54 | } |
55 | 55 | ||
56 | const io::path& CMemoryReadWriteFile::getFileName() const | 56 | const io::path& CMemoryReadWriteFile::getFileName() const |
57 | { | 57 | { |
58 | return FileName; | 58 | return FileName; |
59 | } | 59 | } |
60 | 60 | ||
61 | long CMemoryReadWriteFile::getPos() const | 61 | long CMemoryReadWriteFile::getPos() const |
62 | { | 62 | { |
63 | return Pos; | 63 | return Pos; |
64 | } | 64 | } |
65 | 65 | ||
66 | core::array<c8>& CMemoryReadWriteFile::getData() | 66 | core::array<c8>& CMemoryReadWriteFile::getData() |
67 | { | 67 | { |
68 | return Data; | 68 | return Data; |
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | long CMemoryReadWriteFile::getSize() const | 72 | long CMemoryReadWriteFile::getSize() const |
73 | { | 73 | { |
74 | return Data.size(); | 74 | return Data.size(); |
75 | } | 75 | } |
76 | 76 | ||
77 | 77 | ||
78 | s32 CMemoryReadWriteFile::read(void* buffer, u32 sizeToRead) | 78 | s32 CMemoryReadWriteFile::read(void* buffer, u32 sizeToRead) |
79 | { | 79 | { |
80 | // cant read past the end | 80 | // cant read past the end |
81 | if (Pos + sizeToRead >= Data.size()) | 81 | if (Pos + sizeToRead >= Data.size()) |
82 | sizeToRead = Data.size() - Pos; | 82 | sizeToRead = Data.size() - Pos; |
83 | 83 | ||
84 | // cant read 0 bytes | 84 | // cant read 0 bytes |
85 | if (!sizeToRead) | 85 | if (!sizeToRead) |
86 | return 0; | 86 | return 0; |
87 | 87 | ||
88 | // copy data | 88 | // copy data |
89 | memcpy( buffer, (void*) &Data[Pos], (size_t) sizeToRead); | 89 | memcpy( buffer, (void*) &Data[Pos], (size_t) sizeToRead); |
90 | 90 | ||
91 | Pos += sizeToRead; | 91 | Pos += sizeToRead; |
92 | 92 | ||
93 | return sizeToRead; | 93 | return sizeToRead; |
94 | } | 94 | } |
95 | 95 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h index de20ae7..e0fa06e 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/CMemoryReadWriteFile.h | |||
@@ -1,73 +1,73 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ | 5 | #ifndef __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ |
6 | #define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ | 6 | #define __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IWriteFile.h" | 8 | #include "IWriteFile.h" |
9 | #include "IReadFile.h" | 9 | #include "IReadFile.h" |
10 | #include "irrArray.h" | 10 | #include "irrArray.h" |
11 | #include "irrString.h" | 11 | #include "irrString.h" |
12 | #include "memory.h" | 12 | #include "memory.h" |
13 | 13 | ||
14 | namespace irr | 14 | namespace irr |
15 | { | 15 | { |
16 | namespace io | 16 | namespace io |
17 | { | 17 | { |
18 | 18 | ||
19 | //! Provides write acess to an array as if it is a file. | 19 | //! Provides write acess to an array as if it is a file. |
20 | class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile | 20 | class CMemoryReadWriteFile : public virtual IWriteFile, public virtual IReadFile |
21 | { | 21 | { |
22 | public: | 22 | public: |
23 | 23 | ||
24 | CMemoryReadWriteFile(const c8* filename=0); | 24 | CMemoryReadWriteFile(const c8* filename=0); |
25 | 25 | ||
26 | //! Reads an amount of bytes from the file. | 26 | //! Reads an amount of bytes from the file. |
27 | //! \param buffer: Pointer to buffer of bytes to write. | 27 | //! \param buffer: Pointer to buffer of bytes to write. |
28 | //! \param sizeToWrite: Amount of bytes to wrtie to the file. | 28 | //! \param sizeToWrite: Amount of bytes to wrtie to the file. |
29 | //! \return Returns how much bytes were written. | 29 | //! \return Returns how much bytes were written. |
30 | virtual s32 write(const void* buffer, u32 sizeToWrite); | 30 | virtual s32 write(const void* buffer, u32 sizeToWrite); |
31 | 31 | ||
32 | //! Changes position in file, returns true if successful. | 32 | //! Changes position in file, returns true if successful. |
33 | //! \param finalPos: Destination position in the file. | 33 | //! \param finalPos: Destination position in the file. |
34 | //! \param relativeMovement: If set to true, the position in the file is | 34 | //! \param relativeMovement: If set to true, the position in the file is |
35 | //! changed relative to current position. Otherwise the position is changed | 35 | //! changed relative to current position. Otherwise the position is changed |
36 | //! from begin of file. | 36 | //! from begin of file. |
37 | //! \return Returns true if successful, otherwise false. | 37 | //! \return Returns true if successful, otherwise false. |
38 | virtual bool seek(long finalPos, bool relativeMovement = false); | 38 | virtual bool seek(long finalPos, bool relativeMovement = false); |
39 | 39 | ||
40 | //! Returns size of file. | 40 | //! Returns size of file. |
41 | //! \return Returns the size of the file in bytes. | 41 | //! \return Returns the size of the file in bytes. |
42 | virtual long getSize() const; | 42 | virtual long getSize() const; |
43 | 43 | ||
44 | //! Reads an amount of bytes from the file. | 44 | //! Reads an amount of bytes from the file. |
45 | //! \param buffer: Pointer to buffer where to read bytes will be written to. | 45 | //! \param buffer: Pointer to buffer where to read bytes will be written to. |
46 | //! \param sizeToRead: Amount of bytes to read from the file. | 46 | //! \param sizeToRead: Amount of bytes to read from the file. |
47 | //! \return Returns how much bytes were read. | 47 | //! \return Returns how much bytes were read. |
48 | virtual s32 read(void* buffer, u32 sizeToRead); | 48 | virtual s32 read(void* buffer, u32 sizeToRead); |
49 | 49 | ||
50 | //! Returns the current position in the file. | 50 | //! Returns the current position in the file. |
51 | //! \return Returns the current position in the file in bytes. | 51 | //! \return Returns the current position in the file in bytes. |
52 | virtual long getPos() const; | 52 | virtual long getPos() const; |
53 | 53 | ||
54 | //! Returns name of file. | 54 | //! Returns name of file. |
55 | //! \return Returns the file name as zero terminated character string. | 55 | //! \return Returns the file name as zero terminated character string. |
56 | virtual const io::path& getFileName() const; | 56 | virtual const io::path& getFileName() const; |
57 | 57 | ||
58 | //! Returns file data as an array | 58 | //! Returns file data as an array |
59 | core::array<c8>& getData(); | 59 | core::array<c8>& getData(); |
60 | 60 | ||
61 | private: | 61 | private: |
62 | 62 | ||
63 | core::array<c8> Data; | 63 | core::array<c8> Data; |
64 | io::path FileName; | 64 | io::path FileName; |
65 | long Pos; | 65 | long Pos; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | } // end namespace io | 70 | } // end namespace io |
71 | } // end namespace irr | 71 | } // end namespace irr |
72 | 72 | ||
73 | #endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ | 73 | #endif // __C_MEMORY_READ_WRITE_FILE_H_INCLUDED__ |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h b/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h index 88d119e..fe56726 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h +++ b/libraries/irrlicht-1.8/tools/GUIEditor/EGUIEditTypes.h | |||
@@ -1,61 +1,61 @@ | |||
1 | #ifndef __C_GUIEDIT_TYPES_H_INCLUDED__ | 1 | #ifndef __C_GUIEDIT_TYPES_H_INCLUDED__ |
2 | #define __C_GUIEDIT_TYPES_H_INCLUDED__ | 2 | #define __C_GUIEDIT_TYPES_H_INCLUDED__ |
3 | 3 | ||
4 | #include "irrTypes.h" | 4 | #include "irrTypes.h" |
5 | 5 | ||
6 | namespace irr { | 6 | namespace irr { |
7 | namespace gui { | 7 | namespace gui { |
8 | 8 | ||
9 | enum EGUIEDIT_ELEMENT_TYPES | 9 | enum EGUIEDIT_ELEMENT_TYPES |
10 | { | 10 | { |
11 | // GUI Editor | 11 | // GUI Editor |
12 | EGUIEDIT_GUIEDIT=0, | 12 | EGUIEDIT_GUIEDIT=0, |
13 | EGUIEDIT_GUIEDITWINDOW, | 13 | EGUIEDIT_GUIEDITWINDOW, |
14 | // Generic | 14 | // Generic |
15 | EGUIEDIT_GUIPANEL, | 15 | EGUIEDIT_GUIPANEL, |
16 | EGUIEDIT_TEXTUREBROWSER, | 16 | EGUIEDIT_TEXTUREBROWSER, |
17 | // Attribute editors | 17 | // Attribute editors |
18 | EGUIEDIT_ATTRIBUTEEDITOR, | 18 | EGUIEDIT_ATTRIBUTEEDITOR, |
19 | EGUIEDIT_STRINGATTRIBUTE, | 19 | EGUIEDIT_STRINGATTRIBUTE, |
20 | EGUIEDIT_BOOLATTRIBUTE, | 20 | EGUIEDIT_BOOLATTRIBUTE, |
21 | EGUIEDIT_ENUMATTRIBUTE, | 21 | EGUIEDIT_ENUMATTRIBUTE, |
22 | EGUIEDIT_COLORATTRIBUTE, | 22 | EGUIEDIT_COLORATTRIBUTE, |
23 | EGUIEDIT_COLORFATTRIBUTE, | 23 | EGUIEDIT_COLORFATTRIBUTE, |
24 | EGUIEDIT_TEXTUREATTRIBUTE, | 24 | EGUIEDIT_TEXTUREATTRIBUTE, |
25 | // Dummy editor stubs | 25 | // Dummy editor stubs |
26 | EGUIEDIT_CONTEXTMENUEDITOR, | 26 | EGUIEDIT_CONTEXTMENUEDITOR, |
27 | EGUIEDIT_MENUEDITOR, | 27 | EGUIEDIT_MENUEDITOR, |
28 | EGUIEDIT_FILEDIALOGEDITOR, | 28 | EGUIEDIT_FILEDIALOGEDITOR, |
29 | EGUIEDIT_COLORDIALOGEDITOR, | 29 | EGUIEDIT_COLORDIALOGEDITOR, |
30 | EGUIEDIT_MODALSCREENEDITOR, | 30 | EGUIEDIT_MODALSCREENEDITOR, |
31 | // Count | 31 | // Count |
32 | EGUIEDIT_COUNT | 32 | EGUIEDIT_COUNT |
33 | }; | 33 | }; |
34 | 34 | ||
35 | const c8* const GUIEditElementTypeNames[] = | 35 | const c8* const GUIEditElementTypeNames[] = |
36 | { | 36 | { |
37 | "GUIEditor", | 37 | "GUIEditor", |
38 | "GUIEditWindow", | 38 | "GUIEditWindow", |
39 | "panel", | 39 | "panel", |
40 | "textureCacheBrowser", | 40 | "textureCacheBrowser", |
41 | "attributeEditor", | 41 | "attributeEditor", |
42 | "string_attribute", | 42 | "string_attribute", |
43 | "bool_attribute", | 43 | "bool_attribute", |
44 | "enum_attribute", | 44 | "enum_attribute", |
45 | "color_attribute", | 45 | "color_attribute", |
46 | "colorf_attribute", | 46 | "colorf_attribute", |
47 | "texture_attribute", | 47 | "texture_attribute", |
48 | // dummy editors | 48 | // dummy editors |
49 | "contextMenu_editor", | 49 | "contextMenu_editor", |
50 | "menu_editor", | 50 | "menu_editor", |
51 | "fileOpenDialog_editor", | 51 | "fileOpenDialog_editor", |
52 | "colorSelectDialog_editor", | 52 | "colorSelectDialog_editor", |
53 | "modalScreen_editor", | 53 | "modalScreen_editor", |
54 | 0 | 54 | 0 |
55 | }; | 55 | }; |
56 | 56 | ||
57 | } // gui | 57 | } // gui |
58 | } // irr | 58 | } // irr |
59 | 59 | ||
60 | #endif | 60 | #endif |
61 | 61 | ||
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln index 6f76269..659854d 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.sln | |||
@@ -1,20 +1,20 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 9.00 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 |
3 | # Visual C++ Express 2005 | 3 | # Visual C++ Express 2005 |
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "GUI Editor.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "GUI Editor.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" |
5 | EndProject | 5 | EndProject |
6 | Global | 6 | Global |
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
8 | Debug|Win32 = Debug|Win32 | 8 | Debug|Win32 = Debug|Win32 |
9 | Release|Win32 = Release|Win32 | 9 | Release|Win32 = Release|Win32 |
10 | EndGlobalSection | 10 | EndGlobalSection |
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 | 12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 |
13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 | 13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 |
14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 | 14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 |
15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 | 15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 |
16 | EndGlobalSection | 16 | EndGlobalSection |
17 | GlobalSection(SolutionProperties) = preSolution | 17 | GlobalSection(SolutionProperties) = preSolution |
18 | HideSolutionNode = FALSE | 18 | HideSolutionNode = FALSE |
19 | EndGlobalSection | 19 | EndGlobalSection |
20 | EndGlobal | 20 | EndGlobal |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj index 81c6fa9..e28c5fa 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v8.vcproj | |||
@@ -1,295 +1,295 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="8.00" | 4 | Version="8.00" |
5 | Name="GUI Editor" | 5 | Name="GUI Editor" |
6 | ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" | 6 | ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" |
7 | RootNamespace="GUI Editor" | 7 | RootNamespace="GUI Editor" |
8 | Keyword="Win32Proj" | 8 | Keyword="Win32Proj" |
9 | > | 9 | > |
10 | <Platforms> | 10 | <Platforms> |
11 | <Platform | 11 | <Platform |
12 | Name="Win32" | 12 | Name="Win32" |
13 | /> | 13 | /> |
14 | </Platforms> | 14 | </Platforms> |
15 | <ToolFiles> | 15 | <ToolFiles> |
16 | </ToolFiles> | 16 | </ToolFiles> |
17 | <Configurations> | 17 | <Configurations> |
18 | <Configuration | 18 | <Configuration |
19 | Name="Debug|Win32" | 19 | Name="Debug|Win32" |
20 | OutputDirectory="Debug" | 20 | OutputDirectory="Debug" |
21 | IntermediateDirectory="Debug" | 21 | IntermediateDirectory="Debug" |
22 | ConfigurationType="1" | 22 | ConfigurationType="1" |
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
24 | CharacterSet="2" | 24 | CharacterSet="2" |
25 | > | 25 | > |
26 | <Tool | 26 | <Tool |
27 | Name="VCPreBuildEventTool" | 27 | Name="VCPreBuildEventTool" |
28 | /> | 28 | /> |
29 | <Tool | 29 | <Tool |
30 | Name="VCCustomBuildTool" | 30 | Name="VCCustomBuildTool" |
31 | /> | 31 | /> |
32 | <Tool | 32 | <Tool |
33 | Name="VCXMLDataGeneratorTool" | 33 | Name="VCXMLDataGeneratorTool" |
34 | /> | 34 | /> |
35 | <Tool | 35 | <Tool |
36 | Name="VCWebServiceProxyGeneratorTool" | 36 | Name="VCWebServiceProxyGeneratorTool" |
37 | /> | 37 | /> |
38 | <Tool | 38 | <Tool |
39 | Name="VCMIDLTool" | 39 | Name="VCMIDLTool" |
40 | /> | 40 | /> |
41 | <Tool | 41 | <Tool |
42 | Name="VCCLCompilerTool" | 42 | Name="VCCLCompilerTool" |
43 | Optimization="0" | 43 | Optimization="0" |
44 | FavorSizeOrSpeed="0" | 44 | FavorSizeOrSpeed="0" |
45 | WholeProgramOptimization="false" | 45 | WholeProgramOptimization="false" |
46 | AdditionalIncludeDirectories="..\..\include" | 46 | AdditionalIncludeDirectories="..\..\include" |
47 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 47 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
48 | MinimalRebuild="true" | 48 | MinimalRebuild="true" |
49 | BasicRuntimeChecks="3" | 49 | BasicRuntimeChecks="3" |
50 | RuntimeLibrary="1" | 50 | RuntimeLibrary="1" |
51 | UsePrecompiledHeader="0" | 51 | UsePrecompiledHeader="0" |
52 | WarningLevel="3" | 52 | WarningLevel="3" |
53 | Detect64BitPortabilityProblems="true" | 53 | Detect64BitPortabilityProblems="true" |
54 | DebugInformationFormat="4" | 54 | DebugInformationFormat="4" |
55 | /> | 55 | /> |
56 | <Tool | 56 | <Tool |
57 | Name="VCManagedResourceCompilerTool" | 57 | Name="VCManagedResourceCompilerTool" |
58 | /> | 58 | /> |
59 | <Tool | 59 | <Tool |
60 | Name="VCResourceCompilerTool" | 60 | Name="VCResourceCompilerTool" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCPreLinkEventTool" | 63 | Name="VCPreLinkEventTool" |
64 | /> | 64 | /> |
65 | <Tool | 65 | <Tool |
66 | Name="VCLinkerTool" | 66 | Name="VCLinkerTool" |
67 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " | 67 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " |
68 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" | 68 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" |
69 | LinkIncremental="2" | 69 | LinkIncremental="2" |
70 | AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" | 70 | AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" |
71 | GenerateDebugInformation="true" | 71 | GenerateDebugInformation="true" |
72 | ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" | 72 | ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" |
73 | SubSystem="1" | 73 | SubSystem="1" |
74 | TargetMachine="1" | 74 | TargetMachine="1" |
75 | /> | 75 | /> |
76 | <Tool | 76 | <Tool |
77 | Name="VCALinkTool" | 77 | Name="VCALinkTool" |
78 | /> | 78 | /> |
79 | <Tool | 79 | <Tool |
80 | Name="VCManifestTool" | 80 | Name="VCManifestTool" |
81 | /> | 81 | /> |
82 | <Tool | 82 | <Tool |
83 | Name="VCXDCMakeTool" | 83 | Name="VCXDCMakeTool" |
84 | /> | 84 | /> |
85 | <Tool | 85 | <Tool |
86 | Name="VCBscMakeTool" | 86 | Name="VCBscMakeTool" |
87 | /> | 87 | /> |
88 | <Tool | 88 | <Tool |
89 | Name="VCFxCopTool" | 89 | Name="VCFxCopTool" |
90 | /> | 90 | /> |
91 | <Tool | 91 | <Tool |
92 | Name="VCAppVerifierTool" | 92 | Name="VCAppVerifierTool" |
93 | /> | 93 | /> |
94 | <Tool | 94 | <Tool |
95 | Name="VCWebDeploymentTool" | 95 | Name="VCWebDeploymentTool" |
96 | /> | 96 | /> |
97 | <Tool | 97 | <Tool |
98 | Name="VCPostBuildEventTool" | 98 | Name="VCPostBuildEventTool" |
99 | /> | 99 | /> |
100 | </Configuration> | 100 | </Configuration> |
101 | <Configuration | 101 | <Configuration |
102 | Name="Release|Win32" | 102 | Name="Release|Win32" |
103 | OutputDirectory="Release" | 103 | OutputDirectory="Release" |
104 | IntermediateDirectory="Release" | 104 | IntermediateDirectory="Release" |
105 | ConfigurationType="1" | 105 | ConfigurationType="1" |
106 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 106 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
107 | CharacterSet="2" | 107 | CharacterSet="2" |
108 | > | 108 | > |
109 | <Tool | 109 | <Tool |
110 | Name="VCPreBuildEventTool" | 110 | Name="VCPreBuildEventTool" |
111 | /> | 111 | /> |
112 | <Tool | 112 | <Tool |
113 | Name="VCCustomBuildTool" | 113 | Name="VCCustomBuildTool" |
114 | /> | 114 | /> |
115 | <Tool | 115 | <Tool |
116 | Name="VCXMLDataGeneratorTool" | 116 | Name="VCXMLDataGeneratorTool" |
117 | /> | 117 | /> |
118 | <Tool | 118 | <Tool |
119 | Name="VCWebServiceProxyGeneratorTool" | 119 | Name="VCWebServiceProxyGeneratorTool" |
120 | /> | 120 | /> |
121 | <Tool | 121 | <Tool |
122 | Name="VCMIDLTool" | 122 | Name="VCMIDLTool" |
123 | /> | 123 | /> |
124 | <Tool | 124 | <Tool |
125 | Name="VCCLCompilerTool" | 125 | Name="VCCLCompilerTool" |
126 | Optimization="3" | 126 | Optimization="3" |
127 | WholeProgramOptimization="true" | 127 | WholeProgramOptimization="true" |
128 | AdditionalIncludeDirectories="..\..\include" | 128 | AdditionalIncludeDirectories="..\..\include" |
129 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 129 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
130 | RuntimeLibrary="0" | 130 | RuntimeLibrary="0" |
131 | UsePrecompiledHeader="0" | 131 | UsePrecompiledHeader="0" |
132 | WarningLevel="3" | 132 | WarningLevel="3" |
133 | Detect64BitPortabilityProblems="true" | 133 | Detect64BitPortabilityProblems="true" |
134 | DebugInformationFormat="3" | 134 | DebugInformationFormat="3" |
135 | /> | 135 | /> |
136 | <Tool | 136 | <Tool |
137 | Name="VCManagedResourceCompilerTool" | 137 | Name="VCManagedResourceCompilerTool" |
138 | /> | 138 | /> |
139 | <Tool | 139 | <Tool |
140 | Name="VCResourceCompilerTool" | 140 | Name="VCResourceCompilerTool" |
141 | /> | 141 | /> |
142 | <Tool | 142 | <Tool |
143 | Name="VCPreLinkEventTool" | 143 | Name="VCPreLinkEventTool" |
144 | /> | 144 | /> |
145 | <Tool | 145 | <Tool |
146 | Name="VCLinkerTool" | 146 | Name="VCLinkerTool" |
147 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" | 147 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" |
148 | LinkIncremental="1" | 148 | LinkIncremental="1" |
149 | GenerateDebugInformation="true" | 149 | GenerateDebugInformation="true" |
150 | SubSystem="1" | 150 | SubSystem="1" |
151 | OptimizeReferences="2" | 151 | OptimizeReferences="2" |
152 | EnableCOMDATFolding="2" | 152 | EnableCOMDATFolding="2" |
153 | TargetMachine="1" | 153 | TargetMachine="1" |
154 | /> | 154 | /> |
155 | <Tool | 155 | <Tool |
156 | Name="VCALinkTool" | 156 | Name="VCALinkTool" |
157 | /> | 157 | /> |
158 | <Tool | 158 | <Tool |
159 | Name="VCManifestTool" | 159 | Name="VCManifestTool" |
160 | /> | 160 | /> |
161 | <Tool | 161 | <Tool |
162 | Name="VCXDCMakeTool" | 162 | Name="VCXDCMakeTool" |
163 | /> | 163 | /> |
164 | <Tool | 164 | <Tool |
165 | Name="VCBscMakeTool" | 165 | Name="VCBscMakeTool" |
166 | /> | 166 | /> |
167 | <Tool | 167 | <Tool |
168 | Name="VCFxCopTool" | 168 | Name="VCFxCopTool" |
169 | /> | 169 | /> |
170 | <Tool | 170 | <Tool |
171 | Name="VCAppVerifierTool" | 171 | Name="VCAppVerifierTool" |
172 | /> | 172 | /> |
173 | <Tool | 173 | <Tool |
174 | Name="VCWebDeploymentTool" | 174 | Name="VCWebDeploymentTool" |
175 | /> | 175 | /> |
176 | <Tool | 176 | <Tool |
177 | Name="VCPostBuildEventTool" | 177 | Name="VCPostBuildEventTool" |
178 | /> | 178 | /> |
179 | </Configuration> | 179 | </Configuration> |
180 | </Configurations> | 180 | </Configurations> |
181 | <References> | 181 | <References> |
182 | </References> | 182 | </References> |
183 | <Files> | 183 | <Files> |
184 | <Filter | 184 | <Filter |
185 | Name="gui" | 185 | Name="gui" |
186 | > | 186 | > |
187 | <File | 187 | <File |
188 | RelativePath=".\CGUIEditFactory.cpp" | 188 | RelativePath=".\CGUIEditFactory.cpp" |
189 | > | 189 | > |
190 | </File> | 190 | </File> |
191 | <File | 191 | <File |
192 | RelativePath=".\CGUIEditFactory.h" | 192 | RelativePath=".\CGUIEditFactory.h" |
193 | > | 193 | > |
194 | </File> | 194 | </File> |
195 | <File | 195 | <File |
196 | RelativePath=".\CGUIEditWindow.cpp" | 196 | RelativePath=".\CGUIEditWindow.cpp" |
197 | > | 197 | > |
198 | </File> | 198 | </File> |
199 | <File | 199 | <File |
200 | RelativePath=".\CGUIEditWindow.h" | 200 | RelativePath=".\CGUIEditWindow.h" |
201 | > | 201 | > |
202 | </File> | 202 | </File> |
203 | <File | 203 | <File |
204 | RelativePath=".\CGUIEditWorkspace.cpp" | 204 | RelativePath=".\CGUIEditWorkspace.cpp" |
205 | > | 205 | > |
206 | </File> | 206 | </File> |
207 | <File | 207 | <File |
208 | RelativePath=".\CGUIEditWorkspace.h" | 208 | RelativePath=".\CGUIEditWorkspace.h" |
209 | > | 209 | > |
210 | </File> | 210 | </File> |
211 | <File | 211 | <File |
212 | RelativePath=".\CGUITextureCacheBrowser.cpp" | 212 | RelativePath=".\CGUITextureCacheBrowser.cpp" |
213 | > | 213 | > |
214 | </File> | 214 | </File> |
215 | <File | 215 | <File |
216 | RelativePath=".\CGUITextureCacheBrowser.h" | 216 | RelativePath=".\CGUITextureCacheBrowser.h" |
217 | > | 217 | > |
218 | </File> | 218 | </File> |
219 | <Filter | 219 | <Filter |
220 | Name="GUIAttributes" | 220 | Name="GUIAttributes" |
221 | > | 221 | > |
222 | <File | 222 | <File |
223 | RelativePath=".\CGUIAttribute.h" | 223 | RelativePath=".\CGUIAttribute.h" |
224 | > | 224 | > |
225 | </File> | 225 | </File> |
226 | <File | 226 | <File |
227 | RelativePath=".\CGUIAttributeEditor.cpp" | 227 | RelativePath=".\CGUIAttributeEditor.cpp" |
228 | > | 228 | > |
229 | </File> | 229 | </File> |
230 | <File | 230 | <File |
231 | RelativePath=".\CGUIAttributeEditor.h" | 231 | RelativePath=".\CGUIAttributeEditor.h" |
232 | > | 232 | > |
233 | </File> | 233 | </File> |
234 | <File | 234 | <File |
235 | RelativePath=".\CGUIBoolAttribute.h" | 235 | RelativePath=".\CGUIBoolAttribute.h" |
236 | > | 236 | > |
237 | </File> | 237 | </File> |
238 | <File | 238 | <File |
239 | RelativePath=".\CGUIColorAttribute.h" | 239 | RelativePath=".\CGUIColorAttribute.h" |
240 | > | 240 | > |
241 | </File> | 241 | </File> |
242 | <File | 242 | <File |
243 | RelativePath=".\CGUIEnumAttribute.h" | 243 | RelativePath=".\CGUIEnumAttribute.h" |
244 | > | 244 | > |
245 | </File> | 245 | </File> |
246 | <File | 246 | <File |
247 | RelativePath=".\CGUIStringAttribute.h" | 247 | RelativePath=".\CGUIStringAttribute.h" |
248 | > | 248 | > |
249 | </File> | 249 | </File> |
250 | <File | 250 | <File |
251 | RelativePath=".\CGUITextureAttribute.h" | 251 | RelativePath=".\CGUITextureAttribute.h" |
252 | > | 252 | > |
253 | </File> | 253 | </File> |
254 | </Filter> | 254 | </Filter> |
255 | <Filter | 255 | <Filter |
256 | Name="Useful GUI Elements" | 256 | Name="Useful GUI Elements" |
257 | > | 257 | > |
258 | <File | 258 | <File |
259 | RelativePath=".\CGUIPanel.cpp" | 259 | RelativePath=".\CGUIPanel.cpp" |
260 | > | 260 | > |
261 | </File> | 261 | </File> |
262 | <File | 262 | <File |
263 | RelativePath=".\CGUIPanel.h" | 263 | RelativePath=".\CGUIPanel.h" |
264 | > | 264 | > |
265 | </File> | 265 | </File> |
266 | </Filter> | 266 | </Filter> |
267 | <Filter | 267 | <Filter |
268 | Name="Element Editors" | 268 | Name="Element Editors" |
269 | > | 269 | > |
270 | <File | 270 | <File |
271 | RelativePath=".\CGUIDummyEditorStub.h" | 271 | RelativePath=".\CGUIDummyEditorStub.h" |
272 | > | 272 | > |
273 | </File> | 273 | </File> |
274 | </Filter> | 274 | </Filter> |
275 | </Filter> | 275 | </Filter> |
276 | <Filter | 276 | <Filter |
277 | Name="io" | 277 | Name="io" |
278 | > | 278 | > |
279 | <File | 279 | <File |
280 | RelativePath=".\CMemoryReadWriteFile.cpp" | 280 | RelativePath=".\CMemoryReadWriteFile.cpp" |
281 | > | 281 | > |
282 | </File> | 282 | </File> |
283 | <File | 283 | <File |
284 | RelativePath=".\CMemoryReadWriteFile.h" | 284 | RelativePath=".\CMemoryReadWriteFile.h" |
285 | > | 285 | > |
286 | </File> | 286 | </File> |
287 | </Filter> | 287 | </Filter> |
288 | <File | 288 | <File |
289 | RelativePath=".\main.cpp" | 289 | RelativePath=".\main.cpp" |
290 | > | 290 | > |
291 | </File> | 291 | </File> |
292 | </Files> | 292 | </Files> |
293 | <Globals> | 293 | <Globals> |
294 | </Globals> | 294 | </Globals> |
295 | </VisualStudioProject> | 295 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln index 0acf300..82a8b56 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.sln | |||
@@ -1,20 +1,20 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 10.00 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 |
3 | # Visual C++ Express 2008 | 3 | # Visual C++ Express 2008 |
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor_v9", "GUI Editor_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" |
5 | EndProject | 5 | EndProject |
6 | Global | 6 | Global |
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
8 | Debug|Win32 = Debug|Win32 | 8 | Debug|Win32 = Debug|Win32 |
9 | Release|Win32 = Release|Win32 | 9 | Release|Win32 = Release|Win32 |
10 | EndGlobalSection | 10 | EndGlobalSection |
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 | 12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 |
13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 | 13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 |
14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 | 14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 |
15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 | 15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 |
16 | EndGlobalSection | 16 | EndGlobalSection |
17 | GlobalSection(SolutionProperties) = preSolution | 17 | GlobalSection(SolutionProperties) = preSolution |
18 | HideSolutionNode = FALSE | 18 | HideSolutionNode = FALSE |
19 | EndGlobalSection | 19 | EndGlobalSection |
20 | EndGlobal | 20 | EndGlobal |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj index 6d73d03..79ba177 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_v9.vcproj | |||
@@ -1,293 +1,293 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="9,00" | 4 | Version="9,00" |
5 | Name="GUI Editor_v9" | 5 | Name="GUI Editor_v9" |
6 | ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" | 6 | ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" |
7 | RootNamespace="GUI Editor" | 7 | RootNamespace="GUI Editor" |
8 | Keyword="Win32Proj" | 8 | Keyword="Win32Proj" |
9 | TargetFrameworkVersion="131072" | 9 | TargetFrameworkVersion="131072" |
10 | > | 10 | > |
11 | <Platforms> | 11 | <Platforms> |
12 | <Platform | 12 | <Platform |
13 | Name="Win32" | 13 | Name="Win32" |
14 | /> | 14 | /> |
15 | </Platforms> | 15 | </Platforms> |
16 | <ToolFiles> | 16 | <ToolFiles> |
17 | </ToolFiles> | 17 | </ToolFiles> |
18 | <Configurations> | 18 | <Configurations> |
19 | <Configuration | 19 | <Configuration |
20 | Name="Debug|Win32" | 20 | Name="Debug|Win32" |
21 | OutputDirectory="Debug" | 21 | OutputDirectory="Debug" |
22 | IntermediateDirectory="Debug" | 22 | IntermediateDirectory="Debug" |
23 | ConfigurationType="1" | 23 | ConfigurationType="1" |
24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
25 | CharacterSet="2" | 25 | CharacterSet="2" |
26 | > | 26 | > |
27 | <Tool | 27 | <Tool |
28 | Name="VCPreBuildEventTool" | 28 | Name="VCPreBuildEventTool" |
29 | /> | 29 | /> |
30 | <Tool | 30 | <Tool |
31 | Name="VCCustomBuildTool" | 31 | Name="VCCustomBuildTool" |
32 | /> | 32 | /> |
33 | <Tool | 33 | <Tool |
34 | Name="VCXMLDataGeneratorTool" | 34 | Name="VCXMLDataGeneratorTool" |
35 | /> | 35 | /> |
36 | <Tool | 36 | <Tool |
37 | Name="VCWebServiceProxyGeneratorTool" | 37 | Name="VCWebServiceProxyGeneratorTool" |
38 | /> | 38 | /> |
39 | <Tool | 39 | <Tool |
40 | Name="VCMIDLTool" | 40 | Name="VCMIDLTool" |
41 | /> | 41 | /> |
42 | <Tool | 42 | <Tool |
43 | Name="VCCLCompilerTool" | 43 | Name="VCCLCompilerTool" |
44 | Optimization="0" | 44 | Optimization="0" |
45 | FavorSizeOrSpeed="0" | 45 | FavorSizeOrSpeed="0" |
46 | WholeProgramOptimization="false" | 46 | WholeProgramOptimization="false" |
47 | AdditionalIncludeDirectories="..\..\include" | 47 | AdditionalIncludeDirectories="..\..\include" |
48 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 48 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
49 | MinimalRebuild="true" | 49 | MinimalRebuild="true" |
50 | BasicRuntimeChecks="3" | 50 | BasicRuntimeChecks="3" |
51 | RuntimeLibrary="1" | 51 | RuntimeLibrary="1" |
52 | UsePrecompiledHeader="0" | 52 | UsePrecompiledHeader="0" |
53 | WarningLevel="3" | 53 | WarningLevel="3" |
54 | DebugInformationFormat="4" | 54 | DebugInformationFormat="4" |
55 | /> | 55 | /> |
56 | <Tool | 56 | <Tool |
57 | Name="VCManagedResourceCompilerTool" | 57 | Name="VCManagedResourceCompilerTool" |
58 | /> | 58 | /> |
59 | <Tool | 59 | <Tool |
60 | Name="VCResourceCompilerTool" | 60 | Name="VCResourceCompilerTool" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCPreLinkEventTool" | 63 | Name="VCPreLinkEventTool" |
64 | /> | 64 | /> |
65 | <Tool | 65 | <Tool |
66 | Name="VCLinkerTool" | 66 | Name="VCLinkerTool" |
67 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " | 67 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " |
68 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" | 68 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" |
69 | LinkIncremental="2" | 69 | LinkIncremental="2" |
70 | AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" | 70 | AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" |
71 | GenerateDebugInformation="true" | 71 | GenerateDebugInformation="true" |
72 | ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" | 72 | ProgramDatabaseFile="$(OutDir)/GUIEditor.pdb" |
73 | SubSystem="1" | 73 | SubSystem="1" |
74 | RandomizedBaseAddress="1" | 74 | RandomizedBaseAddress="1" |
75 | DataExecutionPrevention="0" | 75 | DataExecutionPrevention="0" |
76 | TargetMachine="1" | 76 | TargetMachine="1" |
77 | /> | 77 | /> |
78 | <Tool | 78 | <Tool |
79 | Name="VCALinkTool" | 79 | Name="VCALinkTool" |
80 | /> | 80 | /> |
81 | <Tool | 81 | <Tool |
82 | Name="VCManifestTool" | 82 | Name="VCManifestTool" |
83 | /> | 83 | /> |
84 | <Tool | 84 | <Tool |
85 | Name="VCXDCMakeTool" | 85 | Name="VCXDCMakeTool" |
86 | /> | 86 | /> |
87 | <Tool | 87 | <Tool |
88 | Name="VCBscMakeTool" | 88 | Name="VCBscMakeTool" |
89 | /> | 89 | /> |
90 | <Tool | 90 | <Tool |
91 | Name="VCFxCopTool" | 91 | Name="VCFxCopTool" |
92 | /> | 92 | /> |
93 | <Tool | 93 | <Tool |
94 | Name="VCAppVerifierTool" | 94 | Name="VCAppVerifierTool" |
95 | /> | 95 | /> |
96 | <Tool | 96 | <Tool |
97 | Name="VCPostBuildEventTool" | 97 | Name="VCPostBuildEventTool" |
98 | /> | 98 | /> |
99 | </Configuration> | 99 | </Configuration> |
100 | <Configuration | 100 | <Configuration |
101 | Name="Release|Win32" | 101 | Name="Release|Win32" |
102 | OutputDirectory="Release" | 102 | OutputDirectory="Release" |
103 | IntermediateDirectory="Release" | 103 | IntermediateDirectory="Release" |
104 | ConfigurationType="1" | 104 | ConfigurationType="1" |
105 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 105 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
106 | CharacterSet="2" | 106 | CharacterSet="2" |
107 | > | 107 | > |
108 | <Tool | 108 | <Tool |
109 | Name="VCPreBuildEventTool" | 109 | Name="VCPreBuildEventTool" |
110 | /> | 110 | /> |
111 | <Tool | 111 | <Tool |
112 | Name="VCCustomBuildTool" | 112 | Name="VCCustomBuildTool" |
113 | /> | 113 | /> |
114 | <Tool | 114 | <Tool |
115 | Name="VCXMLDataGeneratorTool" | 115 | Name="VCXMLDataGeneratorTool" |
116 | /> | 116 | /> |
117 | <Tool | 117 | <Tool |
118 | Name="VCWebServiceProxyGeneratorTool" | 118 | Name="VCWebServiceProxyGeneratorTool" |
119 | /> | 119 | /> |
120 | <Tool | 120 | <Tool |
121 | Name="VCMIDLTool" | 121 | Name="VCMIDLTool" |
122 | /> | 122 | /> |
123 | <Tool | 123 | <Tool |
124 | Name="VCCLCompilerTool" | 124 | Name="VCCLCompilerTool" |
125 | Optimization="3" | 125 | Optimization="3" |
126 | AdditionalIncludeDirectories="..\..\include" | 126 | AdditionalIncludeDirectories="..\..\include" |
127 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 127 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
128 | RuntimeLibrary="0" | 128 | RuntimeLibrary="0" |
129 | UsePrecompiledHeader="0" | 129 | UsePrecompiledHeader="0" |
130 | WarningLevel="3" | 130 | WarningLevel="3" |
131 | Detect64BitPortabilityProblems="false" | 131 | Detect64BitPortabilityProblems="false" |
132 | DebugInformationFormat="3" | 132 | DebugInformationFormat="3" |
133 | /> | 133 | /> |
134 | <Tool | 134 | <Tool |
135 | Name="VCManagedResourceCompilerTool" | 135 | Name="VCManagedResourceCompilerTool" |
136 | /> | 136 | /> |
137 | <Tool | 137 | <Tool |
138 | Name="VCResourceCompilerTool" | 138 | Name="VCResourceCompilerTool" |
139 | /> | 139 | /> |
140 | <Tool | 140 | <Tool |
141 | Name="VCPreLinkEventTool" | 141 | Name="VCPreLinkEventTool" |
142 | /> | 142 | /> |
143 | <Tool | 143 | <Tool |
144 | Name="VCLinkerTool" | 144 | Name="VCLinkerTool" |
145 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" | 145 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" |
146 | LinkIncremental="1" | 146 | LinkIncremental="1" |
147 | AdditionalLibraryDirectories="../../lib/Win32-Visualstudio" | 147 | AdditionalLibraryDirectories="../../lib/Win32-Visualstudio" |
148 | GenerateDebugInformation="true" | 148 | GenerateDebugInformation="true" |
149 | SubSystem="1" | 149 | SubSystem="1" |
150 | OptimizeReferences="2" | 150 | OptimizeReferences="2" |
151 | EnableCOMDATFolding="2" | 151 | EnableCOMDATFolding="2" |
152 | RandomizedBaseAddress="1" | 152 | RandomizedBaseAddress="1" |
153 | DataExecutionPrevention="0" | 153 | DataExecutionPrevention="0" |
154 | TargetMachine="1" | 154 | TargetMachine="1" |
155 | /> | 155 | /> |
156 | <Tool | 156 | <Tool |
157 | Name="VCALinkTool" | 157 | Name="VCALinkTool" |
158 | /> | 158 | /> |
159 | <Tool | 159 | <Tool |
160 | Name="VCManifestTool" | 160 | Name="VCManifestTool" |
161 | /> | 161 | /> |
162 | <Tool | 162 | <Tool |
163 | Name="VCXDCMakeTool" | 163 | Name="VCXDCMakeTool" |
164 | /> | 164 | /> |
165 | <Tool | 165 | <Tool |
166 | Name="VCBscMakeTool" | 166 | Name="VCBscMakeTool" |
167 | /> | 167 | /> |
168 | <Tool | 168 | <Tool |
169 | Name="VCFxCopTool" | 169 | Name="VCFxCopTool" |
170 | /> | 170 | /> |
171 | <Tool | 171 | <Tool |
172 | Name="VCAppVerifierTool" | 172 | Name="VCAppVerifierTool" |
173 | /> | 173 | /> |
174 | <Tool | 174 | <Tool |
175 | Name="VCPostBuildEventTool" | 175 | Name="VCPostBuildEventTool" |
176 | /> | 176 | /> |
177 | </Configuration> | 177 | </Configuration> |
178 | </Configurations> | 178 | </Configurations> |
179 | <References> | 179 | <References> |
180 | </References> | 180 | </References> |
181 | <Files> | 181 | <Files> |
182 | <Filter | 182 | <Filter |
183 | Name="gui" | 183 | Name="gui" |
184 | > | 184 | > |
185 | <File | 185 | <File |
186 | RelativePath=".\CGUIEditFactory.cpp" | 186 | RelativePath=".\CGUIEditFactory.cpp" |
187 | > | 187 | > |
188 | </File> | 188 | </File> |
189 | <File | 189 | <File |
190 | RelativePath=".\CGUIEditFactory.h" | 190 | RelativePath=".\CGUIEditFactory.h" |
191 | > | 191 | > |
192 | </File> | 192 | </File> |
193 | <File | 193 | <File |
194 | RelativePath=".\CGUIEditWindow.cpp" | 194 | RelativePath=".\CGUIEditWindow.cpp" |
195 | > | 195 | > |
196 | </File> | 196 | </File> |
197 | <File | 197 | <File |
198 | RelativePath=".\CGUIEditWindow.h" | 198 | RelativePath=".\CGUIEditWindow.h" |
199 | > | 199 | > |
200 | </File> | 200 | </File> |
201 | <File | 201 | <File |
202 | RelativePath=".\CGUIEditWorkspace.cpp" | 202 | RelativePath=".\CGUIEditWorkspace.cpp" |
203 | > | 203 | > |
204 | </File> | 204 | </File> |
205 | <File | 205 | <File |
206 | RelativePath=".\CGUIEditWorkspace.h" | 206 | RelativePath=".\CGUIEditWorkspace.h" |
207 | > | 207 | > |
208 | </File> | 208 | </File> |
209 | <File | 209 | <File |
210 | RelativePath=".\CGUITextureCacheBrowser.cpp" | 210 | RelativePath=".\CGUITextureCacheBrowser.cpp" |
211 | > | 211 | > |
212 | </File> | 212 | </File> |
213 | <File | 213 | <File |
214 | RelativePath=".\CGUITextureCacheBrowser.h" | 214 | RelativePath=".\CGUITextureCacheBrowser.h" |
215 | > | 215 | > |
216 | </File> | 216 | </File> |
217 | <Filter | 217 | <Filter |
218 | Name="GUIAttributes" | 218 | Name="GUIAttributes" |
219 | > | 219 | > |
220 | <File | 220 | <File |
221 | RelativePath=".\CGUIAttribute.h" | 221 | RelativePath=".\CGUIAttribute.h" |
222 | > | 222 | > |
223 | </File> | 223 | </File> |
224 | <File | 224 | <File |
225 | RelativePath=".\CGUIAttributeEditor.cpp" | 225 | RelativePath=".\CGUIAttributeEditor.cpp" |
226 | > | 226 | > |
227 | </File> | 227 | </File> |
228 | <File | 228 | <File |
229 | RelativePath=".\CGUIAttributeEditor.h" | 229 | RelativePath=".\CGUIAttributeEditor.h" |
230 | > | 230 | > |
231 | </File> | 231 | </File> |
232 | <File | 232 | <File |
233 | RelativePath=".\CGUIBoolAttribute.h" | 233 | RelativePath=".\CGUIBoolAttribute.h" |
234 | > | 234 | > |
235 | </File> | 235 | </File> |
236 | <File | 236 | <File |
237 | RelativePath=".\CGUIColorAttribute.h" | 237 | RelativePath=".\CGUIColorAttribute.h" |
238 | > | 238 | > |
239 | </File> | 239 | </File> |
240 | <File | 240 | <File |
241 | RelativePath=".\CGUIEnumAttribute.h" | 241 | RelativePath=".\CGUIEnumAttribute.h" |
242 | > | 242 | > |
243 | </File> | 243 | </File> |
244 | <File | 244 | <File |
245 | RelativePath=".\CGUIStringAttribute.h" | 245 | RelativePath=".\CGUIStringAttribute.h" |
246 | > | 246 | > |
247 | </File> | 247 | </File> |
248 | <File | 248 | <File |
249 | RelativePath=".\CGUITextureAttribute.h" | 249 | RelativePath=".\CGUITextureAttribute.h" |
250 | > | 250 | > |
251 | </File> | 251 | </File> |
252 | </Filter> | 252 | </Filter> |
253 | <Filter | 253 | <Filter |
254 | Name="Useful GUI Elements" | 254 | Name="Useful GUI Elements" |
255 | > | 255 | > |
256 | <File | 256 | <File |
257 | RelativePath=".\CGUIPanel.cpp" | 257 | RelativePath=".\CGUIPanel.cpp" |
258 | > | 258 | > |
259 | </File> | 259 | </File> |
260 | <File | 260 | <File |
261 | RelativePath=".\CGUIPanel.h" | 261 | RelativePath=".\CGUIPanel.h" |
262 | > | 262 | > |
263 | </File> | 263 | </File> |
264 | </Filter> | 264 | </Filter> |
265 | <Filter | 265 | <Filter |
266 | Name="Element Editors" | 266 | Name="Element Editors" |
267 | > | 267 | > |
268 | <File | 268 | <File |
269 | RelativePath=".\CGUIDummyEditorStub.h" | 269 | RelativePath=".\CGUIDummyEditorStub.h" |
270 | > | 270 | > |
271 | </File> | 271 | </File> |
272 | </Filter> | 272 | </Filter> |
273 | </Filter> | 273 | </Filter> |
274 | <Filter | 274 | <Filter |
275 | Name="io" | 275 | Name="io" |
276 | > | 276 | > |
277 | <File | 277 | <File |
278 | RelativePath=".\CMemoryReadWriteFile.cpp" | 278 | RelativePath=".\CMemoryReadWriteFile.cpp" |
279 | > | 279 | > |
280 | </File> | 280 | </File> |
281 | <File | 281 | <File |
282 | RelativePath=".\CMemoryReadWriteFile.h" | 282 | RelativePath=".\CMemoryReadWriteFile.h" |
283 | > | 283 | > |
284 | </File> | 284 | </File> |
285 | </Filter> | 285 | </Filter> |
286 | <File | 286 | <File |
287 | RelativePath=".\main.cpp" | 287 | RelativePath=".\main.cpp" |
288 | > | 288 | > |
289 | </File> | 289 | </File> |
290 | </Files> | 290 | </Files> |
291 | <Globals> | 291 | <Globals> |
292 | </Globals> | 292 | </Globals> |
293 | </VisualStudioProject> | 293 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj index 7022876..5c85f4b 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj | |||
@@ -1,213 +1,213 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> | 22 | <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> |
23 | <RootNamespace>GUI Editor</RootNamespace> | 23 | <RootNamespace>GUI Editor</RootNamespace> |
24 | <Keyword>Win32Proj</Keyword> | 24 | <Keyword>Win32Proj</Keyword> |
25 | <ProjectName>GUIEditor</ProjectName> | 25 | <ProjectName>GUIEditor</ProjectName> |
26 | </PropertyGroup> | 26 | </PropertyGroup> |
27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
29 | <ConfigurationType>Application</ConfigurationType> | 29 | <ConfigurationType>Application</ConfigurationType> |
30 | <CharacterSet>MultiByte</CharacterSet> | 30 | <CharacterSet>MultiByte</CharacterSet> |
31 | </PropertyGroup> | 31 | </PropertyGroup> |
32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
33 | <ConfigurationType>Application</ConfigurationType> | 33 | <ConfigurationType>Application</ConfigurationType> |
34 | <CharacterSet>MultiByte</CharacterSet> | 34 | <CharacterSet>MultiByte</CharacterSet> |
35 | </PropertyGroup> | 35 | </PropertyGroup> |
36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
37 | <ConfigurationType>Application</ConfigurationType> | 37 | <ConfigurationType>Application</ConfigurationType> |
38 | <CharacterSet>MultiByte</CharacterSet> | 38 | <CharacterSet>MultiByte</CharacterSet> |
39 | </PropertyGroup> | 39 | </PropertyGroup> |
40 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 40 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
41 | <ConfigurationType>Application</ConfigurationType> | 41 | <ConfigurationType>Application</ConfigurationType> |
42 | <CharacterSet>MultiByte</CharacterSet> | 42 | <CharacterSet>MultiByte</CharacterSet> |
43 | </PropertyGroup> | 43 | </PropertyGroup> |
44 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 44 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
45 | <ImportGroup Label="ExtensionSettings"> | 45 | <ImportGroup Label="ExtensionSettings"> |
46 | </ImportGroup> | 46 | </ImportGroup> |
47 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 47 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
48 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 48 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
49 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 49 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
50 | </ImportGroup> | 50 | </ImportGroup> |
51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
54 | </ImportGroup> | 54 | </ImportGroup> |
55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
58 | </ImportGroup> | 58 | </ImportGroup> |
59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
62 | </ImportGroup> | 62 | </ImportGroup> |
63 | <PropertyGroup Label="UserMacros" /> | 63 | <PropertyGroup Label="UserMacros" /> |
64 | <PropertyGroup> | 64 | <PropertyGroup> |
65 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 65 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
66 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 66 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
68 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | 68 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | 69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> | 72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> |
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> | 73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> |
74 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 74 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
76 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 76 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
78 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 78 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
86 | </PropertyGroup> | 86 | </PropertyGroup> |
87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
88 | <ClCompile> | 88 | <ClCompile> |
89 | <Optimization>Disabled</Optimization> | 89 | <Optimization>Disabled</Optimization> |
90 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 90 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
91 | <WholeProgramOptimization>false</WholeProgramOptimization> | 91 | <WholeProgramOptimization>false</WholeProgramOptimization> |
92 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 92 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
93 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 93 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
94 | <MinimalRebuild>true</MinimalRebuild> | 94 | <MinimalRebuild>true</MinimalRebuild> |
95 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 95 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
96 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 96 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
97 | <PrecompiledHeader> | 97 | <PrecompiledHeader> |
98 | </PrecompiledHeader> | 98 | </PrecompiledHeader> |
99 | <WarningLevel>Level3</WarningLevel> | 99 | <WarningLevel>Level3</WarningLevel> |
100 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 100 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
101 | </ClCompile> | 101 | </ClCompile> |
102 | <Link> | 102 | <Link> |
103 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 103 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
104 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 104 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
105 | <GenerateDebugInformation>true</GenerateDebugInformation> | 105 | <GenerateDebugInformation>true</GenerateDebugInformation> |
106 | <SubSystem>Console</SubSystem> | 106 | <SubSystem>Console</SubSystem> |
107 | <DataExecutionPrevention> | 107 | <DataExecutionPrevention> |
108 | </DataExecutionPrevention> | 108 | </DataExecutionPrevention> |
109 | </Link> | 109 | </Link> |
110 | </ItemDefinitionGroup> | 110 | </ItemDefinitionGroup> |
111 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 111 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
112 | <ClCompile> | 112 | <ClCompile> |
113 | <Optimization>Disabled</Optimization> | 113 | <Optimization>Disabled</Optimization> |
114 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 114 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
115 | <WholeProgramOptimization>false</WholeProgramOptimization> | 115 | <WholeProgramOptimization>false</WholeProgramOptimization> |
116 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 116 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
117 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 117 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
118 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 118 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
119 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 119 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
120 | <PrecompiledHeader> | 120 | <PrecompiledHeader> |
121 | </PrecompiledHeader> | 121 | </PrecompiledHeader> |
122 | <WarningLevel>Level3</WarningLevel> | 122 | <WarningLevel>Level3</WarningLevel> |
123 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 123 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
124 | </ClCompile> | 124 | </ClCompile> |
125 | <Link> | 125 | <Link> |
126 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 126 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
127 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 127 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
128 | <GenerateDebugInformation>true</GenerateDebugInformation> | 128 | <GenerateDebugInformation>true</GenerateDebugInformation> |
129 | <SubSystem>Console</SubSystem> | 129 | <SubSystem>Console</SubSystem> |
130 | <DataExecutionPrevention> | 130 | <DataExecutionPrevention> |
131 | </DataExecutionPrevention> | 131 | </DataExecutionPrevention> |
132 | </Link> | 132 | </Link> |
133 | </ItemDefinitionGroup> | 133 | </ItemDefinitionGroup> |
134 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 134 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
135 | <ClCompile> | 135 | <ClCompile> |
136 | <Optimization>Full</Optimization> | 136 | <Optimization>Full</Optimization> |
137 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 137 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
138 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 138 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
139 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 139 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
140 | <PrecompiledHeader> | 140 | <PrecompiledHeader> |
141 | </PrecompiledHeader> | 141 | </PrecompiledHeader> |
142 | <WarningLevel>Level3</WarningLevel> | 142 | <WarningLevel>Level3</WarningLevel> |
143 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 143 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
144 | </ClCompile> | 144 | </ClCompile> |
145 | <Link> | 145 | <Link> |
146 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> | 146 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> |
147 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 147 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
148 | <GenerateDebugInformation>true</GenerateDebugInformation> | 148 | <GenerateDebugInformation>true</GenerateDebugInformation> |
149 | <SubSystem>Console</SubSystem> | 149 | <SubSystem>Console</SubSystem> |
150 | <OptimizeReferences>true</OptimizeReferences> | 150 | <OptimizeReferences>true</OptimizeReferences> |
151 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 151 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
152 | <DataExecutionPrevention> | 152 | <DataExecutionPrevention> |
153 | </DataExecutionPrevention> | 153 | </DataExecutionPrevention> |
154 | </Link> | 154 | </Link> |
155 | </ItemDefinitionGroup> | 155 | </ItemDefinitionGroup> |
156 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 156 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
157 | <ClCompile> | 157 | <ClCompile> |
158 | <Optimization>Full</Optimization> | 158 | <Optimization>Full</Optimization> |
159 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 159 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
160 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 160 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
161 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 161 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
162 | <PrecompiledHeader> | 162 | <PrecompiledHeader> |
163 | </PrecompiledHeader> | 163 | </PrecompiledHeader> |
164 | <WarningLevel>Level3</WarningLevel> | 164 | <WarningLevel>Level3</WarningLevel> |
165 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 165 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
166 | </ClCompile> | 166 | </ClCompile> |
167 | <Link> | 167 | <Link> |
168 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> | 168 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> |
169 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 169 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
170 | <GenerateDebugInformation>true</GenerateDebugInformation> | 170 | <GenerateDebugInformation>true</GenerateDebugInformation> |
171 | <SubSystem>Console</SubSystem> | 171 | <SubSystem>Console</SubSystem> |
172 | <OptimizeReferences>true</OptimizeReferences> | 172 | <OptimizeReferences>true</OptimizeReferences> |
173 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 173 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
174 | <DataExecutionPrevention> | 174 | <DataExecutionPrevention> |
175 | </DataExecutionPrevention> | 175 | </DataExecutionPrevention> |
176 | </Link> | 176 | </Link> |
177 | </ItemDefinitionGroup> | 177 | </ItemDefinitionGroup> |
178 | <ItemGroup> | 178 | <ItemGroup> |
179 | <ClCompile Include="CGUIEditFactory.cpp" /> | 179 | <ClCompile Include="CGUIEditFactory.cpp" /> |
180 | <ClCompile Include="CGUIEditWindow.cpp" /> | 180 | <ClCompile Include="CGUIEditWindow.cpp" /> |
181 | <ClCompile Include="CGUIEditWorkspace.cpp" /> | 181 | <ClCompile Include="CGUIEditWorkspace.cpp" /> |
182 | <ClCompile Include="CGUITextureCacheBrowser.cpp" /> | 182 | <ClCompile Include="CGUITextureCacheBrowser.cpp" /> |
183 | <ClCompile Include="CGUIAttributeEditor.cpp" /> | 183 | <ClCompile Include="CGUIAttributeEditor.cpp" /> |
184 | <ClCompile Include="CGUIPanel.cpp" /> | 184 | <ClCompile Include="CGUIPanel.cpp" /> |
185 | <ClCompile Include="CMemoryReadWriteFile.cpp" /> | 185 | <ClCompile Include="CMemoryReadWriteFile.cpp" /> |
186 | <ClCompile Include="main.cpp" /> | 186 | <ClCompile Include="main.cpp" /> |
187 | </ItemGroup> | 187 | </ItemGroup> |
188 | <ItemGroup> | 188 | <ItemGroup> |
189 | <ClInclude Include="CGUIEditFactory.h" /> | 189 | <ClInclude Include="CGUIEditFactory.h" /> |
190 | <ClInclude Include="CGUIEditWindow.h" /> | 190 | <ClInclude Include="CGUIEditWindow.h" /> |
191 | <ClInclude Include="CGUIEditWorkspace.h" /> | 191 | <ClInclude Include="CGUIEditWorkspace.h" /> |
192 | <ClInclude Include="CGUITextureCacheBrowser.h" /> | 192 | <ClInclude Include="CGUITextureCacheBrowser.h" /> |
193 | <ClInclude Include="CGUIAttribute.h" /> | 193 | <ClInclude Include="CGUIAttribute.h" /> |
194 | <ClInclude Include="CGUIAttributeEditor.h" /> | 194 | <ClInclude Include="CGUIAttributeEditor.h" /> |
195 | <ClInclude Include="CGUIBoolAttribute.h" /> | 195 | <ClInclude Include="CGUIBoolAttribute.h" /> |
196 | <ClInclude Include="CGUIColorAttribute.h" /> | 196 | <ClInclude Include="CGUIColorAttribute.h" /> |
197 | <ClInclude Include="CGUIEnumAttribute.h" /> | 197 | <ClInclude Include="CGUIEnumAttribute.h" /> |
198 | <ClInclude Include="CGUIStringAttribute.h" /> | 198 | <ClInclude Include="CGUIStringAttribute.h" /> |
199 | <ClInclude Include="CGUITextureAttribute.h" /> | 199 | <ClInclude Include="CGUITextureAttribute.h" /> |
200 | <ClInclude Include="CGUIPanel.h" /> | 200 | <ClInclude Include="CGUIPanel.h" /> |
201 | <ClInclude Include="CGUIDummyEditorStub.h" /> | 201 | <ClInclude Include="CGUIDummyEditorStub.h" /> |
202 | <ClInclude Include="CMemoryReadWriteFile.h" /> | 202 | <ClInclude Include="CMemoryReadWriteFile.h" /> |
203 | </ItemGroup> | 203 | </ItemGroup> |
204 | <ItemGroup> | 204 | <ItemGroup> |
205 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> | 205 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> |
206 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> | 206 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> |
207 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | 207 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
208 | </ProjectReference> | 208 | </ProjectReference> |
209 | </ItemGroup> | 209 | </ItemGroup> |
210 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 210 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
211 | <ImportGroup Label="ExtensionTargets"> | 211 | <ImportGroup Label="ExtensionTargets"> |
212 | </ImportGroup> | 212 | </ImportGroup> |
213 | </Project> \ No newline at end of file | 213 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters index 1d06fa4..3644f98 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc10.vcxproj.filters | |||
@@ -1,88 +1,88 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup> | 3 | <ItemGroup> |
4 | <Filter Include="gui"> | 4 | <Filter Include="gui"> |
5 | <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> | 5 | <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> |
6 | </Filter> | 6 | </Filter> |
7 | <Filter Include="gui\GUIAttributes"> | 7 | <Filter Include="gui\GUIAttributes"> |
8 | <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> | 8 | <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> |
9 | </Filter> | 9 | </Filter> |
10 | <Filter Include="gui\Useful GUI Elements"> | 10 | <Filter Include="gui\Useful GUI Elements"> |
11 | <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> | 11 | <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> |
12 | </Filter> | 12 | </Filter> |
13 | <Filter Include="gui\Element Editors"> | 13 | <Filter Include="gui\Element Editors"> |
14 | <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> | 14 | <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> |
15 | </Filter> | 15 | </Filter> |
16 | <Filter Include="io"> | 16 | <Filter Include="io"> |
17 | <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> | 17 | <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> |
18 | </Filter> | 18 | </Filter> |
19 | </ItemGroup> | 19 | </ItemGroup> |
20 | <ItemGroup> | 20 | <ItemGroup> |
21 | <ClCompile Include="CGUIEditFactory.cpp"> | 21 | <ClCompile Include="CGUIEditFactory.cpp"> |
22 | <Filter>gui</Filter> | 22 | <Filter>gui</Filter> |
23 | </ClCompile> | 23 | </ClCompile> |
24 | <ClCompile Include="CGUIEditWindow.cpp"> | 24 | <ClCompile Include="CGUIEditWindow.cpp"> |
25 | <Filter>gui</Filter> | 25 | <Filter>gui</Filter> |
26 | </ClCompile> | 26 | </ClCompile> |
27 | <ClCompile Include="CGUIEditWorkspace.cpp"> | 27 | <ClCompile Include="CGUIEditWorkspace.cpp"> |
28 | <Filter>gui</Filter> | 28 | <Filter>gui</Filter> |
29 | </ClCompile> | 29 | </ClCompile> |
30 | <ClCompile Include="CGUITextureCacheBrowser.cpp"> | 30 | <ClCompile Include="CGUITextureCacheBrowser.cpp"> |
31 | <Filter>gui</Filter> | 31 | <Filter>gui</Filter> |
32 | </ClCompile> | 32 | </ClCompile> |
33 | <ClCompile Include="CGUIAttributeEditor.cpp"> | 33 | <ClCompile Include="CGUIAttributeEditor.cpp"> |
34 | <Filter>gui\GUIAttributes</Filter> | 34 | <Filter>gui\GUIAttributes</Filter> |
35 | </ClCompile> | 35 | </ClCompile> |
36 | <ClCompile Include="CGUIPanel.cpp"> | 36 | <ClCompile Include="CGUIPanel.cpp"> |
37 | <Filter>gui\Useful GUI Elements</Filter> | 37 | <Filter>gui\Useful GUI Elements</Filter> |
38 | </ClCompile> | 38 | </ClCompile> |
39 | <ClCompile Include="CMemoryReadWriteFile.cpp"> | 39 | <ClCompile Include="CMemoryReadWriteFile.cpp"> |
40 | <Filter>io</Filter> | 40 | <Filter>io</Filter> |
41 | </ClCompile> | 41 | </ClCompile> |
42 | <ClCompile Include="main.cpp" /> | 42 | <ClCompile Include="main.cpp" /> |
43 | </ItemGroup> | 43 | </ItemGroup> |
44 | <ItemGroup> | 44 | <ItemGroup> |
45 | <ClInclude Include="CGUIEditFactory.h"> | 45 | <ClInclude Include="CGUIEditFactory.h"> |
46 | <Filter>gui</Filter> | 46 | <Filter>gui</Filter> |
47 | </ClInclude> | 47 | </ClInclude> |
48 | <ClInclude Include="CGUIEditWindow.h"> | 48 | <ClInclude Include="CGUIEditWindow.h"> |
49 | <Filter>gui</Filter> | 49 | <Filter>gui</Filter> |
50 | </ClInclude> | 50 | </ClInclude> |
51 | <ClInclude Include="CGUIEditWorkspace.h"> | 51 | <ClInclude Include="CGUIEditWorkspace.h"> |
52 | <Filter>gui</Filter> | 52 | <Filter>gui</Filter> |
53 | </ClInclude> | 53 | </ClInclude> |
54 | <ClInclude Include="CGUITextureCacheBrowser.h"> | 54 | <ClInclude Include="CGUITextureCacheBrowser.h"> |
55 | <Filter>gui</Filter> | 55 | <Filter>gui</Filter> |
56 | </ClInclude> | 56 | </ClInclude> |
57 | <ClInclude Include="CGUIAttribute.h"> | 57 | <ClInclude Include="CGUIAttribute.h"> |
58 | <Filter>gui\GUIAttributes</Filter> | 58 | <Filter>gui\GUIAttributes</Filter> |
59 | </ClInclude> | 59 | </ClInclude> |
60 | <ClInclude Include="CGUIAttributeEditor.h"> | 60 | <ClInclude Include="CGUIAttributeEditor.h"> |
61 | <Filter>gui\GUIAttributes</Filter> | 61 | <Filter>gui\GUIAttributes</Filter> |
62 | </ClInclude> | 62 | </ClInclude> |
63 | <ClInclude Include="CGUIBoolAttribute.h"> | 63 | <ClInclude Include="CGUIBoolAttribute.h"> |
64 | <Filter>gui\GUIAttributes</Filter> | 64 | <Filter>gui\GUIAttributes</Filter> |
65 | </ClInclude> | 65 | </ClInclude> |
66 | <ClInclude Include="CGUIColorAttribute.h"> | 66 | <ClInclude Include="CGUIColorAttribute.h"> |
67 | <Filter>gui\GUIAttributes</Filter> | 67 | <Filter>gui\GUIAttributes</Filter> |
68 | </ClInclude> | 68 | </ClInclude> |
69 | <ClInclude Include="CGUIEnumAttribute.h"> | 69 | <ClInclude Include="CGUIEnumAttribute.h"> |
70 | <Filter>gui\GUIAttributes</Filter> | 70 | <Filter>gui\GUIAttributes</Filter> |
71 | </ClInclude> | 71 | </ClInclude> |
72 | <ClInclude Include="CGUIStringAttribute.h"> | 72 | <ClInclude Include="CGUIStringAttribute.h"> |
73 | <Filter>gui\GUIAttributes</Filter> | 73 | <Filter>gui\GUIAttributes</Filter> |
74 | </ClInclude> | 74 | </ClInclude> |
75 | <ClInclude Include="CGUITextureAttribute.h"> | 75 | <ClInclude Include="CGUITextureAttribute.h"> |
76 | <Filter>gui\GUIAttributes</Filter> | 76 | <Filter>gui\GUIAttributes</Filter> |
77 | </ClInclude> | 77 | </ClInclude> |
78 | <ClInclude Include="CGUIPanel.h"> | 78 | <ClInclude Include="CGUIPanel.h"> |
79 | <Filter>gui\Useful GUI Elements</Filter> | 79 | <Filter>gui\Useful GUI Elements</Filter> |
80 | </ClInclude> | 80 | </ClInclude> |
81 | <ClInclude Include="CGUIDummyEditorStub.h"> | 81 | <ClInclude Include="CGUIDummyEditorStub.h"> |
82 | <Filter>gui\Element Editors</Filter> | 82 | <Filter>gui\Element Editors</Filter> |
83 | </ClInclude> | 83 | </ClInclude> |
84 | <ClInclude Include="CMemoryReadWriteFile.h"> | 84 | <ClInclude Include="CMemoryReadWriteFile.h"> |
85 | <Filter>io</Filter> | 85 | <Filter>io</Filter> |
86 | </ClInclude> | 86 | </ClInclude> |
87 | </ItemGroup> | 87 | </ItemGroup> |
88 | </Project> \ No newline at end of file | 88 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj index 6c6f28b..d2dc2e3 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj | |||
@@ -1,217 +1,217 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> | 22 | <ProjectGuid>{853A396E-C031-4C26-A716-5B4E176BE11D}</ProjectGuid> |
23 | <RootNamespace>GUI Editor</RootNamespace> | 23 | <RootNamespace>GUI Editor</RootNamespace> |
24 | <Keyword>Win32Proj</Keyword> | 24 | <Keyword>Win32Proj</Keyword> |
25 | <ProjectName>GUIEditor</ProjectName> | 25 | <ProjectName>GUIEditor</ProjectName> |
26 | </PropertyGroup> | 26 | </PropertyGroup> |
27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
29 | <ConfigurationType>Application</ConfigurationType> | 29 | <ConfigurationType>Application</ConfigurationType> |
30 | <CharacterSet>MultiByte</CharacterSet> | 30 | <CharacterSet>MultiByte</CharacterSet> |
31 | <PlatformToolset>v110</PlatformToolset> | 31 | <PlatformToolset>v110</PlatformToolset> |
32 | </PropertyGroup> | 32 | </PropertyGroup> |
33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
34 | <ConfigurationType>Application</ConfigurationType> | 34 | <ConfigurationType>Application</ConfigurationType> |
35 | <CharacterSet>MultiByte</CharacterSet> | 35 | <CharacterSet>MultiByte</CharacterSet> |
36 | <PlatformToolset>v110</PlatformToolset> | 36 | <PlatformToolset>v110</PlatformToolset> |
37 | </PropertyGroup> | 37 | </PropertyGroup> |
38 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 38 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
39 | <ConfigurationType>Application</ConfigurationType> | 39 | <ConfigurationType>Application</ConfigurationType> |
40 | <CharacterSet>MultiByte</CharacterSet> | 40 | <CharacterSet>MultiByte</CharacterSet> |
41 | <PlatformToolset>v110</PlatformToolset> | 41 | <PlatformToolset>v110</PlatformToolset> |
42 | </PropertyGroup> | 42 | </PropertyGroup> |
43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
44 | <ConfigurationType>Application</ConfigurationType> | 44 | <ConfigurationType>Application</ConfigurationType> |
45 | <CharacterSet>MultiByte</CharacterSet> | 45 | <CharacterSet>MultiByte</CharacterSet> |
46 | <PlatformToolset>v110</PlatformToolset> | 46 | <PlatformToolset>v110</PlatformToolset> |
47 | </PropertyGroup> | 47 | </PropertyGroup> |
48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
49 | <ImportGroup Label="ExtensionSettings"> | 49 | <ImportGroup Label="ExtensionSettings"> |
50 | </ImportGroup> | 50 | </ImportGroup> |
51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
54 | </ImportGroup> | 54 | </ImportGroup> |
55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
58 | </ImportGroup> | 58 | </ImportGroup> |
59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
62 | </ImportGroup> | 62 | </ImportGroup> |
63 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 63 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
64 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 64 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
65 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 65 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
66 | </ImportGroup> | 66 | </ImportGroup> |
67 | <PropertyGroup Label="UserMacros" /> | 67 | <PropertyGroup Label="UserMacros" /> |
68 | <PropertyGroup> | 68 | <PropertyGroup> |
69 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 69 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | 72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | 73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> | 76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> |
77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> | 77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> |
78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
90 | </PropertyGroup> | 90 | </PropertyGroup> |
91 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 91 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
92 | <ClCompile> | 92 | <ClCompile> |
93 | <Optimization>Disabled</Optimization> | 93 | <Optimization>Disabled</Optimization> |
94 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 94 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
95 | <WholeProgramOptimization>false</WholeProgramOptimization> | 95 | <WholeProgramOptimization>false</WholeProgramOptimization> |
96 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 96 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
97 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 97 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
98 | <MinimalRebuild>true</MinimalRebuild> | 98 | <MinimalRebuild>true</MinimalRebuild> |
99 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 99 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
100 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 100 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
101 | <PrecompiledHeader> | 101 | <PrecompiledHeader> |
102 | </PrecompiledHeader> | 102 | </PrecompiledHeader> |
103 | <WarningLevel>Level3</WarningLevel> | 103 | <WarningLevel>Level3</WarningLevel> |
104 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 104 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
105 | </ClCompile> | 105 | </ClCompile> |
106 | <Link> | 106 | <Link> |
107 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 107 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
108 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 108 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
109 | <GenerateDebugInformation>true</GenerateDebugInformation> | 109 | <GenerateDebugInformation>true</GenerateDebugInformation> |
110 | <SubSystem>Console</SubSystem> | 110 | <SubSystem>Console</SubSystem> |
111 | <DataExecutionPrevention> | 111 | <DataExecutionPrevention> |
112 | </DataExecutionPrevention> | 112 | </DataExecutionPrevention> |
113 | </Link> | 113 | </Link> |
114 | </ItemDefinitionGroup> | 114 | </ItemDefinitionGroup> |
115 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 115 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
116 | <ClCompile> | 116 | <ClCompile> |
117 | <Optimization>Disabled</Optimization> | 117 | <Optimization>Disabled</Optimization> |
118 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 118 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
119 | <WholeProgramOptimization>false</WholeProgramOptimization> | 119 | <WholeProgramOptimization>false</WholeProgramOptimization> |
120 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 120 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
121 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 121 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
122 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 122 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
123 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 123 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
124 | <PrecompiledHeader> | 124 | <PrecompiledHeader> |
125 | </PrecompiledHeader> | 125 | </PrecompiledHeader> |
126 | <WarningLevel>Level3</WarningLevel> | 126 | <WarningLevel>Level3</WarningLevel> |
127 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 127 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
128 | </ClCompile> | 128 | </ClCompile> |
129 | <Link> | 129 | <Link> |
130 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 130 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
131 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 131 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
132 | <GenerateDebugInformation>true</GenerateDebugInformation> | 132 | <GenerateDebugInformation>true</GenerateDebugInformation> |
133 | <SubSystem>Console</SubSystem> | 133 | <SubSystem>Console</SubSystem> |
134 | <DataExecutionPrevention> | 134 | <DataExecutionPrevention> |
135 | </DataExecutionPrevention> | 135 | </DataExecutionPrevention> |
136 | </Link> | 136 | </Link> |
137 | </ItemDefinitionGroup> | 137 | </ItemDefinitionGroup> |
138 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 138 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
139 | <ClCompile> | 139 | <ClCompile> |
140 | <Optimization>Full</Optimization> | 140 | <Optimization>Full</Optimization> |
141 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 141 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
142 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 142 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
143 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 143 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
144 | <PrecompiledHeader> | 144 | <PrecompiledHeader> |
145 | </PrecompiledHeader> | 145 | </PrecompiledHeader> |
146 | <WarningLevel>Level3</WarningLevel> | 146 | <WarningLevel>Level3</WarningLevel> |
147 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 147 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
148 | </ClCompile> | 148 | </ClCompile> |
149 | <Link> | 149 | <Link> |
150 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> | 150 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> |
151 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 151 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
152 | <GenerateDebugInformation>true</GenerateDebugInformation> | 152 | <GenerateDebugInformation>true</GenerateDebugInformation> |
153 | <SubSystem>Console</SubSystem> | 153 | <SubSystem>Console</SubSystem> |
154 | <OptimizeReferences>true</OptimizeReferences> | 154 | <OptimizeReferences>true</OptimizeReferences> |
155 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 155 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
156 | <DataExecutionPrevention> | 156 | <DataExecutionPrevention> |
157 | </DataExecutionPrevention> | 157 | </DataExecutionPrevention> |
158 | </Link> | 158 | </Link> |
159 | </ItemDefinitionGroup> | 159 | </ItemDefinitionGroup> |
160 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 160 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
161 | <ClCompile> | 161 | <ClCompile> |
162 | <Optimization>Full</Optimization> | 162 | <Optimization>Full</Optimization> |
163 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 163 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
164 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 164 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
165 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 165 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
166 | <PrecompiledHeader> | 166 | <PrecompiledHeader> |
167 | </PrecompiledHeader> | 167 | </PrecompiledHeader> |
168 | <WarningLevel>Level3</WarningLevel> | 168 | <WarningLevel>Level3</WarningLevel> |
169 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 169 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
170 | </ClCompile> | 170 | </ClCompile> |
171 | <Link> | 171 | <Link> |
172 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> | 172 | <OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile> |
173 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 173 | <AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
174 | <GenerateDebugInformation>true</GenerateDebugInformation> | 174 | <GenerateDebugInformation>true</GenerateDebugInformation> |
175 | <SubSystem>Console</SubSystem> | 175 | <SubSystem>Console</SubSystem> |
176 | <OptimizeReferences>true</OptimizeReferences> | 176 | <OptimizeReferences>true</OptimizeReferences> |
177 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 177 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
178 | <DataExecutionPrevention> | 178 | <DataExecutionPrevention> |
179 | </DataExecutionPrevention> | 179 | </DataExecutionPrevention> |
180 | </Link> | 180 | </Link> |
181 | </ItemDefinitionGroup> | 181 | </ItemDefinitionGroup> |
182 | <ItemGroup> | 182 | <ItemGroup> |
183 | <ClCompile Include="CGUIEditFactory.cpp" /> | 183 | <ClCompile Include="CGUIEditFactory.cpp" /> |
184 | <ClCompile Include="CGUIEditWindow.cpp" /> | 184 | <ClCompile Include="CGUIEditWindow.cpp" /> |
185 | <ClCompile Include="CGUIEditWorkspace.cpp" /> | 185 | <ClCompile Include="CGUIEditWorkspace.cpp" /> |
186 | <ClCompile Include="CGUITextureCacheBrowser.cpp" /> | 186 | <ClCompile Include="CGUITextureCacheBrowser.cpp" /> |
187 | <ClCompile Include="CGUIAttributeEditor.cpp" /> | 187 | <ClCompile Include="CGUIAttributeEditor.cpp" /> |
188 | <ClCompile Include="CGUIPanel.cpp" /> | 188 | <ClCompile Include="CGUIPanel.cpp" /> |
189 | <ClCompile Include="CMemoryReadWriteFile.cpp" /> | 189 | <ClCompile Include="CMemoryReadWriteFile.cpp" /> |
190 | <ClCompile Include="main.cpp" /> | 190 | <ClCompile Include="main.cpp" /> |
191 | </ItemGroup> | 191 | </ItemGroup> |
192 | <ItemGroup> | 192 | <ItemGroup> |
193 | <ClInclude Include="CGUIEditFactory.h" /> | 193 | <ClInclude Include="CGUIEditFactory.h" /> |
194 | <ClInclude Include="CGUIEditWindow.h" /> | 194 | <ClInclude Include="CGUIEditWindow.h" /> |
195 | <ClInclude Include="CGUIEditWorkspace.h" /> | 195 | <ClInclude Include="CGUIEditWorkspace.h" /> |
196 | <ClInclude Include="CGUITextureCacheBrowser.h" /> | 196 | <ClInclude Include="CGUITextureCacheBrowser.h" /> |
197 | <ClInclude Include="CGUIAttribute.h" /> | 197 | <ClInclude Include="CGUIAttribute.h" /> |
198 | <ClInclude Include="CGUIAttributeEditor.h" /> | 198 | <ClInclude Include="CGUIAttributeEditor.h" /> |
199 | <ClInclude Include="CGUIBoolAttribute.h" /> | 199 | <ClInclude Include="CGUIBoolAttribute.h" /> |
200 | <ClInclude Include="CGUIColorAttribute.h" /> | 200 | <ClInclude Include="CGUIColorAttribute.h" /> |
201 | <ClInclude Include="CGUIEnumAttribute.h" /> | 201 | <ClInclude Include="CGUIEnumAttribute.h" /> |
202 | <ClInclude Include="CGUIStringAttribute.h" /> | 202 | <ClInclude Include="CGUIStringAttribute.h" /> |
203 | <ClInclude Include="CGUITextureAttribute.h" /> | 203 | <ClInclude Include="CGUITextureAttribute.h" /> |
204 | <ClInclude Include="CGUIPanel.h" /> | 204 | <ClInclude Include="CGUIPanel.h" /> |
205 | <ClInclude Include="CGUIDummyEditorStub.h" /> | 205 | <ClInclude Include="CGUIDummyEditorStub.h" /> |
206 | <ClInclude Include="CMemoryReadWriteFile.h" /> | 206 | <ClInclude Include="CMemoryReadWriteFile.h" /> |
207 | </ItemGroup> | 207 | </ItemGroup> |
208 | <ItemGroup> | 208 | <ItemGroup> |
209 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> | 209 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> |
210 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> | 210 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> |
211 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | 211 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
212 | </ProjectReference> | 212 | </ProjectReference> |
213 | </ItemGroup> | 213 | </ItemGroup> |
214 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 214 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
215 | <ImportGroup Label="ExtensionTargets"> | 215 | <ImportGroup Label="ExtensionTargets"> |
216 | </ImportGroup> | 216 | </ImportGroup> |
217 | </Project> \ No newline at end of file | 217 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters index 1d06fa4..3644f98 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters +++ b/libraries/irrlicht-1.8/tools/GUIEditor/GUI Editor_vc11.vcxproj.filters | |||
@@ -1,88 +1,88 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup> | 3 | <ItemGroup> |
4 | <Filter Include="gui"> | 4 | <Filter Include="gui"> |
5 | <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> | 5 | <UniqueIdentifier>{f6ad9df9-ebaa-4c0f-997b-c8101c1fc669}</UniqueIdentifier> |
6 | </Filter> | 6 | </Filter> |
7 | <Filter Include="gui\GUIAttributes"> | 7 | <Filter Include="gui\GUIAttributes"> |
8 | <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> | 8 | <UniqueIdentifier>{7fd14cb1-d2e7-4fd0-85c1-68fc9d1249f7}</UniqueIdentifier> |
9 | </Filter> | 9 | </Filter> |
10 | <Filter Include="gui\Useful GUI Elements"> | 10 | <Filter Include="gui\Useful GUI Elements"> |
11 | <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> | 11 | <UniqueIdentifier>{ab2c3f3a-1d99-4619-b5df-47fdd9449f3f}</UniqueIdentifier> |
12 | </Filter> | 12 | </Filter> |
13 | <Filter Include="gui\Element Editors"> | 13 | <Filter Include="gui\Element Editors"> |
14 | <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> | 14 | <UniqueIdentifier>{740a4255-37cc-4ac4-94e9-f2f0970491a8}</UniqueIdentifier> |
15 | </Filter> | 15 | </Filter> |
16 | <Filter Include="io"> | 16 | <Filter Include="io"> |
17 | <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> | 17 | <UniqueIdentifier>{a28a0b21-3336-432f-9759-ff2dc064874a}</UniqueIdentifier> |
18 | </Filter> | 18 | </Filter> |
19 | </ItemGroup> | 19 | </ItemGroup> |
20 | <ItemGroup> | 20 | <ItemGroup> |
21 | <ClCompile Include="CGUIEditFactory.cpp"> | 21 | <ClCompile Include="CGUIEditFactory.cpp"> |
22 | <Filter>gui</Filter> | 22 | <Filter>gui</Filter> |
23 | </ClCompile> | 23 | </ClCompile> |
24 | <ClCompile Include="CGUIEditWindow.cpp"> | 24 | <ClCompile Include="CGUIEditWindow.cpp"> |
25 | <Filter>gui</Filter> | 25 | <Filter>gui</Filter> |
26 | </ClCompile> | 26 | </ClCompile> |
27 | <ClCompile Include="CGUIEditWorkspace.cpp"> | 27 | <ClCompile Include="CGUIEditWorkspace.cpp"> |
28 | <Filter>gui</Filter> | 28 | <Filter>gui</Filter> |
29 | </ClCompile> | 29 | </ClCompile> |
30 | <ClCompile Include="CGUITextureCacheBrowser.cpp"> | 30 | <ClCompile Include="CGUITextureCacheBrowser.cpp"> |
31 | <Filter>gui</Filter> | 31 | <Filter>gui</Filter> |
32 | </ClCompile> | 32 | </ClCompile> |
33 | <ClCompile Include="CGUIAttributeEditor.cpp"> | 33 | <ClCompile Include="CGUIAttributeEditor.cpp"> |
34 | <Filter>gui\GUIAttributes</Filter> | 34 | <Filter>gui\GUIAttributes</Filter> |
35 | </ClCompile> | 35 | </ClCompile> |
36 | <ClCompile Include="CGUIPanel.cpp"> | 36 | <ClCompile Include="CGUIPanel.cpp"> |
37 | <Filter>gui\Useful GUI Elements</Filter> | 37 | <Filter>gui\Useful GUI Elements</Filter> |
38 | </ClCompile> | 38 | </ClCompile> |
39 | <ClCompile Include="CMemoryReadWriteFile.cpp"> | 39 | <ClCompile Include="CMemoryReadWriteFile.cpp"> |
40 | <Filter>io</Filter> | 40 | <Filter>io</Filter> |
41 | </ClCompile> | 41 | </ClCompile> |
42 | <ClCompile Include="main.cpp" /> | 42 | <ClCompile Include="main.cpp" /> |
43 | </ItemGroup> | 43 | </ItemGroup> |
44 | <ItemGroup> | 44 | <ItemGroup> |
45 | <ClInclude Include="CGUIEditFactory.h"> | 45 | <ClInclude Include="CGUIEditFactory.h"> |
46 | <Filter>gui</Filter> | 46 | <Filter>gui</Filter> |
47 | </ClInclude> | 47 | </ClInclude> |
48 | <ClInclude Include="CGUIEditWindow.h"> | 48 | <ClInclude Include="CGUIEditWindow.h"> |
49 | <Filter>gui</Filter> | 49 | <Filter>gui</Filter> |
50 | </ClInclude> | 50 | </ClInclude> |
51 | <ClInclude Include="CGUIEditWorkspace.h"> | 51 | <ClInclude Include="CGUIEditWorkspace.h"> |
52 | <Filter>gui</Filter> | 52 | <Filter>gui</Filter> |
53 | </ClInclude> | 53 | </ClInclude> |
54 | <ClInclude Include="CGUITextureCacheBrowser.h"> | 54 | <ClInclude Include="CGUITextureCacheBrowser.h"> |
55 | <Filter>gui</Filter> | 55 | <Filter>gui</Filter> |
56 | </ClInclude> | 56 | </ClInclude> |
57 | <ClInclude Include="CGUIAttribute.h"> | 57 | <ClInclude Include="CGUIAttribute.h"> |
58 | <Filter>gui\GUIAttributes</Filter> | 58 | <Filter>gui\GUIAttributes</Filter> |
59 | </ClInclude> | 59 | </ClInclude> |
60 | <ClInclude Include="CGUIAttributeEditor.h"> | 60 | <ClInclude Include="CGUIAttributeEditor.h"> |
61 | <Filter>gui\GUIAttributes</Filter> | 61 | <Filter>gui\GUIAttributes</Filter> |
62 | </ClInclude> | 62 | </ClInclude> |
63 | <ClInclude Include="CGUIBoolAttribute.h"> | 63 | <ClInclude Include="CGUIBoolAttribute.h"> |
64 | <Filter>gui\GUIAttributes</Filter> | 64 | <Filter>gui\GUIAttributes</Filter> |
65 | </ClInclude> | 65 | </ClInclude> |
66 | <ClInclude Include="CGUIColorAttribute.h"> | 66 | <ClInclude Include="CGUIColorAttribute.h"> |
67 | <Filter>gui\GUIAttributes</Filter> | 67 | <Filter>gui\GUIAttributes</Filter> |
68 | </ClInclude> | 68 | </ClInclude> |
69 | <ClInclude Include="CGUIEnumAttribute.h"> | 69 | <ClInclude Include="CGUIEnumAttribute.h"> |
70 | <Filter>gui\GUIAttributes</Filter> | 70 | <Filter>gui\GUIAttributes</Filter> |
71 | </ClInclude> | 71 | </ClInclude> |
72 | <ClInclude Include="CGUIStringAttribute.h"> | 72 | <ClInclude Include="CGUIStringAttribute.h"> |
73 | <Filter>gui\GUIAttributes</Filter> | 73 | <Filter>gui\GUIAttributes</Filter> |
74 | </ClInclude> | 74 | </ClInclude> |
75 | <ClInclude Include="CGUITextureAttribute.h"> | 75 | <ClInclude Include="CGUITextureAttribute.h"> |
76 | <Filter>gui\GUIAttributes</Filter> | 76 | <Filter>gui\GUIAttributes</Filter> |
77 | </ClInclude> | 77 | </ClInclude> |
78 | <ClInclude Include="CGUIPanel.h"> | 78 | <ClInclude Include="CGUIPanel.h"> |
79 | <Filter>gui\Useful GUI Elements</Filter> | 79 | <Filter>gui\Useful GUI Elements</Filter> |
80 | </ClInclude> | 80 | </ClInclude> |
81 | <ClInclude Include="CGUIDummyEditorStub.h"> | 81 | <ClInclude Include="CGUIDummyEditorStub.h"> |
82 | <Filter>gui\Element Editors</Filter> | 82 | <Filter>gui\Element Editors</Filter> |
83 | </ClInclude> | 83 | </ClInclude> |
84 | <ClInclude Include="CMemoryReadWriteFile.h"> | 84 | <ClInclude Include="CMemoryReadWriteFile.h"> |
85 | <Filter>io</Filter> | 85 | <Filter>io</Filter> |
86 | </ClInclude> | 86 | </ClInclude> |
87 | </ItemGroup> | 87 | </ItemGroup> |
88 | </Project> \ No newline at end of file | 88 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/Makefile b/libraries/irrlicht-1.8/tools/GUIEditor/Makefile index 02f8189..6010a2d 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/Makefile +++ b/libraries/irrlicht-1.8/tools/GUIEditor/Makefile | |||
@@ -1,43 +1,43 @@ | |||
1 | # Irrlicht Engine GUIEditor Makefile | 1 | # Irrlicht Engine GUIEditor Makefile |
2 | Target = GUIEditor | 2 | Target = GUIEditor |
3 | Sources = CGUIAttributeEditor.cpp CGUIEditFactory.cpp CGUIEditWindow.cpp CGUIEditWorkspace.cpp CGUIPanel.cpp CGUITextureCacheBrowser.cpp CMemoryReadWriteFile.cpp main.cpp | 3 | Sources = CGUIAttributeEditor.cpp CGUIEditFactory.cpp CGUIEditWindow.cpp CGUIEditWorkspace.cpp CGUIPanel.cpp CGUITextureCacheBrowser.cpp CMemoryReadWriteFile.cpp main.cpp |
4 | 4 | ||
5 | CPPFLAGS = -I../../include -I/usr/X11R6/include | 5 | CPPFLAGS = -I../../include -I/usr/X11R6/include |
6 | CXXFLAGS = -Wall -O3 -ffast-math | 6 | CXXFLAGS = -Wall -O3 -ffast-math |
7 | 7 | ||
8 | ifeq ($(HOSTTYPE), x86_64) | 8 | ifeq ($(HOSTTYPE), x86_64) |
9 | LIBSELECT=64 | 9 | LIBSELECT=64 |
10 | endif | 10 | endif |
11 | 11 | ||
12 | all: all_linux | 12 | all: all_linux |
13 | 13 | ||
14 | # target specific settings | 14 | # target specific settings |
15 | all_linux: SYSTEM=Linux | 15 | all_linux: SYSTEM=Linux |
16 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 | 16 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 |
17 | 17 | ||
18 | all_win32 clean_win32: SYSTEM=Win32-gcc | 18 | all_win32 clean_win32: SYSTEM=Win32-gcc |
19 | all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm | 19 | all_win32: LDFLAGS = -L../../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm |
20 | 20 | ||
21 | # if you enable sound add the proper library for linking | 21 | # if you enable sound add the proper library for linking |
22 | #LDFLAGS += -lIrrKlang | 22 | #LDFLAGS += -lIrrKlang |
23 | #LDFLAGS += -laudiere | 23 | #LDFLAGS += -laudiere |
24 | #LDFLAGS += -lSDL_mixer -lSDL | 24 | #LDFLAGS += -lSDL_mixer -lSDL |
25 | 25 | ||
26 | all_win32 clean_win32: SUF=.exe | 26 | all_win32 clean_win32: SUF=.exe |
27 | # name of the binary - only valid for targets which set SYSTEM | 27 | # name of the binary - only valid for targets which set SYSTEM |
28 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) | 28 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) |
29 | 29 | ||
30 | OBJ = $(Sources:.cpp=.o) | 30 | OBJ = $(Sources:.cpp=.o) |
31 | 31 | ||
32 | all_linux all_win32: $(OBJ) | 32 | all_linux all_win32: $(OBJ) |
33 | $(warning Building...) | 33 | $(warning Building...) |
34 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) | 34 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $^ -o $(DESTPATH) $(LDFLAGS) |
35 | 35 | ||
36 | clean: clean_linux clean_win32 | 36 | clean: clean_linux clean_win32 |
37 | $(warning Cleaning...) | 37 | $(warning Cleaning...) |
38 | @$(RM) $(OBJ) | 38 | @$(RM) $(OBJ) |
39 | 39 | ||
40 | clean_linux clean_win32: | 40 | clean_linux clean_win32: |
41 | @$(RM) $(DESTPATH) | 41 | @$(RM) $(DESTPATH) |
42 | 42 | ||
43 | .PHONY: all all_win32 clean clean_linux clean_win32 | 43 | .PHONY: all all_win32 clean clean_linux clean_win32 |
diff --git a/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp b/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp index e8434b2..1d917d3 100644 --- a/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp +++ b/libraries/irrlicht-1.8/tools/GUIEditor/main.cpp | |||
@@ -1,76 +1,76 @@ | |||
1 | #include <irrlicht.h> | 1 | #include <irrlicht.h> |
2 | #include "driverChoice.h" | 2 | #include "driverChoice.h" |
3 | 3 | ||
4 | // include the gui creator element factory | 4 | // include the gui creator element factory |
5 | #include "CGUIEditFactory.h" | 5 | #include "CGUIEditFactory.h" |
6 | 6 | ||
7 | using namespace irr; | 7 | using namespace irr; |
8 | using namespace gui; | 8 | using namespace gui; |
9 | 9 | ||
10 | #ifdef _MSC_VER | 10 | #ifdef _MSC_VER |
11 | #pragma comment(lib, "Irrlicht.lib") | 11 | #pragma comment(lib, "Irrlicht.lib") |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | int main() | 14 | int main() |
15 | { | 15 | { |
16 | // ask user for driver | 16 | // ask user for driver |
17 | video::E_DRIVER_TYPE driverType=driverChoiceConsole(); | 17 | video::E_DRIVER_TYPE driverType=driverChoiceConsole(); |
18 | if (driverType==video::EDT_COUNT) | 18 | if (driverType==video::EDT_COUNT) |
19 | return 1; | 19 | return 1; |
20 | 20 | ||
21 | IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600)); | 21 | IrrlichtDevice *device = createDevice(driverType, core::dimension2du(800, 600)); |
22 | video::IVideoDriver* driver = device->getVideoDriver(); | 22 | video::IVideoDriver* driver = device->getVideoDriver(); |
23 | scene::ISceneManager* smgr = device->getSceneManager(); | 23 | scene::ISceneManager* smgr = device->getSceneManager(); |
24 | gui::IGUIEnvironment *env = device->getGUIEnvironment(); | 24 | gui::IGUIEnvironment *env = device->getGUIEnvironment(); |
25 | 25 | ||
26 | device->setResizable(true); | 26 | device->setResizable(true); |
27 | 27 | ||
28 | /* | 28 | /* |
29 | first we create the factory which can make new GUI elements | 29 | first we create the factory which can make new GUI elements |
30 | and register it with the gui environment. | 30 | and register it with the gui environment. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | IGUIElementFactory* factory = new CGUIEditFactory(env); | 33 | IGUIElementFactory* factory = new CGUIEditFactory(env); |
34 | env->registerGUIElementFactory(factory); | 34 | env->registerGUIElementFactory(factory); |
35 | // remember to drop since we created with a create call | 35 | // remember to drop since we created with a create call |
36 | factory->drop(); | 36 | factory->drop(); |
37 | 37 | ||
38 | IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC); | 38 | IGUISkin *skin = env->createSkin(EGST_WINDOWS_METALLIC); |
39 | env->setSkin(skin); | 39 | env->setSkin(skin); |
40 | 40 | ||
41 | IGUIFont *font = env->getFont("../../media/lucida.xml"); | 41 | IGUIFont *font = env->getFont("../../media/lucida.xml"); |
42 | if (font) | 42 | if (font) |
43 | skin->setFont(font); | 43 | skin->setFont(font); |
44 | skin->drop(); | 44 | skin->drop(); |
45 | 45 | ||
46 | // change transparency of skin | 46 | // change transparency of skin |
47 | for (s32 i=0; i<gui::EGDC_COUNT ; ++i) | 47 | for (s32 i=0; i<gui::EGDC_COUNT ; ++i) |
48 | { | 48 | { |
49 | video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); | 49 | video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); |
50 | col.setAlpha(250); | 50 | col.setAlpha(250); |
51 | env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); | 51 | env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); |
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | /* |
55 | now we add the GUI Editor Workspace | 55 | now we add the GUI Editor Workspace |
56 | */ | 56 | */ |
57 | 57 | ||
58 | env->addGUIElement("GUIEditor"); | 58 | env->addGUIElement("GUIEditor"); |
59 | 59 | ||
60 | while(device->run()) | 60 | while(device->run()) |
61 | { | 61 | { |
62 | device->sleep(10); | 62 | device->sleep(10); |
63 | 63 | ||
64 | if (device->isWindowActive()) | 64 | if (device->isWindowActive()) |
65 | { | 65 | { |
66 | driver->beginScene(true, true, video::SColor(0,200,200,200)); | 66 | driver->beginScene(true, true, video::SColor(0,200,200,200)); |
67 | smgr->drawAll(); | 67 | smgr->drawAll(); |
68 | env->drawAll(); | 68 | env->drawAll(); |
69 | driver->endScene(); | 69 | driver->endScene(); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||
73 | device->drop(); | 73 | device->drop(); |
74 | 74 | ||
75 | return 0; | 75 | return 0; |
76 | } | 76 | } |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.cpp b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.cpp index 780e9b0..7579d5d 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.cpp +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CFontTool.cpp | |||
@@ -1,801 +1,801 @@ | |||
1 | #include "CFontTool.h" | 1 | #include "CFontTool.h" |
2 | #include "IXMLWriter.h" | 2 | #include "IXMLWriter.h" |
3 | 3 | ||
4 | using namespace irr; | 4 | using namespace irr; |
5 | 5 | ||
6 | const int fontsizes[] = {4,6,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,56,68,72,0}; | 6 | const int fontsizes[] = {4,6,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,56,68,72,0}; |
7 | 7 | ||
8 | inline u32 getTextureSizeFromSurfaceSize(u32 size) | 8 | inline u32 getTextureSizeFromSurfaceSize(u32 size) |
9 | { | 9 | { |
10 | u32 ts = 0x01; | 10 | u32 ts = 0x01; |
11 | while(ts < size) | 11 | while(ts < size) |
12 | ts <<= 1; | 12 | ts <<= 1; |
13 | 13 | ||
14 | return ts; | 14 | return ts; |
15 | } | 15 | } |
16 | 16 | ||
17 | // windows specific | 17 | // windows specific |
18 | #ifdef _IRR_WINDOWS_ | 18 | #ifdef _IRR_WINDOWS_ |
19 | 19 | ||
20 | const DWORD charsets[] = { ANSI_CHARSET, DEFAULT_CHARSET, OEM_CHARSET, BALTIC_CHARSET, GB2312_CHARSET, CHINESEBIG5_CHARSET, | 20 | const DWORD charsets[] = { ANSI_CHARSET, DEFAULT_CHARSET, OEM_CHARSET, BALTIC_CHARSET, GB2312_CHARSET, CHINESEBIG5_CHARSET, |
21 | EASTEUROPE_CHARSET, GREEK_CHARSET, HANGUL_CHARSET, MAC_CHARSET, RUSSIAN_CHARSET, | 21 | EASTEUROPE_CHARSET, GREEK_CHARSET, HANGUL_CHARSET, MAC_CHARSET, RUSSIAN_CHARSET, |
22 | SHIFTJIS_CHARSET, SYMBOL_CHARSET, TURKISH_CHARSET, VIETNAMESE_CHARSET, JOHAB_CHARSET, | 22 | SHIFTJIS_CHARSET, SYMBOL_CHARSET, TURKISH_CHARSET, VIETNAMESE_CHARSET, JOHAB_CHARSET, |
23 | ARABIC_CHARSET, HEBREW_CHARSET, THAI_CHARSET, 0}; | 23 | ARABIC_CHARSET, HEBREW_CHARSET, THAI_CHARSET, 0}; |
24 | 24 | ||
25 | const wchar_t *setnames[] = {L"ANSI", L"All Available", L"OEM", L"Baltic", L"Chinese Simplified", L"Chinese Traditional", | 25 | const wchar_t *setnames[] = {L"ANSI", L"All Available", L"OEM", L"Baltic", L"Chinese Simplified", L"Chinese Traditional", |
26 | L"Eastern European", L"Greek", L"Hangul", L"Macintosh", L"Russian", | 26 | L"Eastern European", L"Greek", L"Hangul", L"Macintosh", L"Russian", |
27 | L"Japanese", L"Symbol", L"Turkish", L"Vietnamese", L"Johab", | 27 | L"Japanese", L"Symbol", L"Turkish", L"Vietnamese", L"Johab", |
28 | L"Arabic", L"Hebrew", L"Thai", 0}; | 28 | L"Arabic", L"Hebrew", L"Thai", 0}; |
29 | 29 | ||
30 | // callback for adding font names | 30 | // callback for adding font names |
31 | int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, | 31 | int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, |
32 | DWORD FontType, LPARAM lParam) | 32 | DWORD FontType, LPARAM lParam) |
33 | { | 33 | { |
34 | CFontTool* t = (CFontTool*) lParam; | 34 | CFontTool* t = (CFontTool*) lParam; |
35 | t->FontNames.push_back( core::stringw(lpelfe->elfFullName)); | 35 | t->FontNames.push_back( core::stringw(lpelfe->elfFullName)); |
36 | return 1; | 36 | return 1; |
37 | } | 37 | } |
38 | 38 | ||
39 | // | 39 | // |
40 | // Constructor | 40 | // Constructor |
41 | // | 41 | // |
42 | 42 | ||
43 | CFontTool::CFontTool(IrrlichtDevice* device) : FontSizes(fontsizes), | 43 | CFontTool::CFontTool(IrrlichtDevice* device) : FontSizes(fontsizes), |
44 | Device(device), UseAlphaChannel(false), | 44 | Device(device), UseAlphaChannel(false), |
45 | // win specific | 45 | // win specific |
46 | dc(0) | 46 | dc(0) |
47 | { | 47 | { |
48 | // init display context | 48 | // init display context |
49 | dc = CreateDC(L"DISPLAY", L"DISPLAY", 0 ,0 ); | 49 | dc = CreateDC(L"DISPLAY", L"DISPLAY", 0 ,0 ); |
50 | 50 | ||
51 | // populate list of available character set names | 51 | // populate list of available character set names |
52 | for (int i=0; setnames[i] != 0; ++i) | 52 | for (int i=0; setnames[i] != 0; ++i) |
53 | CharSets.push_back( core::stringw(setnames[i])); | 53 | CharSets.push_back( core::stringw(setnames[i])); |
54 | 54 | ||
55 | selectCharSet(0); | 55 | selectCharSet(0); |
56 | } | 56 | } |
57 | 57 | ||
58 | void CFontTool::selectCharSet(u32 currentCharSet) | 58 | void CFontTool::selectCharSet(u32 currentCharSet) |
59 | { | 59 | { |
60 | if ( currentCharSet >= CharSets.size() ) | 60 | if ( currentCharSet >= CharSets.size() ) |
61 | return; | 61 | return; |
62 | 62 | ||
63 | LOGFONTW lf; | 63 | LOGFONTW lf; |
64 | lf.lfFaceName[0] = L'\0'; | 64 | lf.lfFaceName[0] = L'\0'; |
65 | lf.lfCharSet = (BYTE) charsets[currentCharSet]; | 65 | lf.lfCharSet = (BYTE) charsets[currentCharSet]; |
66 | // HRESULT hr; // no error checking(!) | 66 | // HRESULT hr; // no error checking(!) |
67 | 67 | ||
68 | // clear font list | 68 | // clear font list |
69 | FontNames.clear(); | 69 | FontNames.clear(); |
70 | 70 | ||
71 | // create list of available fonts | 71 | // create list of available fonts |
72 | EnumFontFamiliesExW( dc, (LPLOGFONTW) &lf, (FONTENUMPROCW) EnumFontFamExProc, (LPARAM) this, 0); | 72 | EnumFontFamiliesExW( dc, (LPLOGFONTW) &lf, (FONTENUMPROCW) EnumFontFamExProc, (LPARAM) this, 0); |
73 | } | 73 | } |
74 | 74 | ||
75 | bool CFontTool::makeBitmapFont(u32 fontIndex, u32 charsetIndex, s32 fontSize, u32 textureWidth, u32 textureHeight, bool bold, bool italic, bool aa, bool alpha) | 75 | bool CFontTool::makeBitmapFont(u32 fontIndex, u32 charsetIndex, s32 fontSize, u32 textureWidth, u32 textureHeight, bool bold, bool italic, bool aa, bool alpha) |
76 | { | 76 | { |
77 | if (fontIndex >= FontNames.size() || charsetIndex >= CharSets.size() ) | 77 | if (fontIndex >= FontNames.size() || charsetIndex >= CharSets.size() ) |
78 | return false; | 78 | return false; |
79 | 79 | ||
80 | UseAlphaChannel = alpha; | 80 | UseAlphaChannel = alpha; |
81 | u32 currentImage = 0; | 81 | u32 currentImage = 0; |
82 | 82 | ||
83 | // create the font | 83 | // create the font |
84 | HFONT font = CreateFontW( | 84 | HFONT font = CreateFontW( |
85 | -MulDiv(fontSize, GetDeviceCaps(dc, LOGPIXELSY), 72), 0, | 85 | -MulDiv(fontSize, GetDeviceCaps(dc, LOGPIXELSY), 72), 0, |
86 | 0,0, | 86 | 0,0, |
87 | bold ? FW_BOLD : 0, | 87 | bold ? FW_BOLD : 0, |
88 | italic, 0,0, charsets[charsetIndex], 0,0, | 88 | italic, 0,0, charsets[charsetIndex], 0,0, |
89 | aa ? ANTIALIASED_QUALITY : 0, | 89 | aa ? ANTIALIASED_QUALITY : 0, |
90 | 0, FontNames[fontIndex].c_str() ); | 90 | 0, FontNames[fontIndex].c_str() ); |
91 | 91 | ||
92 | if (!font) | 92 | if (!font) |
93 | return false; | 93 | return false; |
94 | 94 | ||
95 | SelectObject(dc, font); | 95 | SelectObject(dc, font); |
96 | SetTextAlign (dc,TA_LEFT | TA_TOP | TA_NOUPDATECP); | 96 | SetTextAlign (dc,TA_LEFT | TA_TOP | TA_NOUPDATECP); |
97 | 97 | ||
98 | // get rid of the current textures/images | 98 | // get rid of the current textures/images |
99 | for (u32 i=0; i<currentTextures.size(); ++i) | 99 | for (u32 i=0; i<currentTextures.size(); ++i) |
100 | currentTextures[i]->drop(); | 100 | currentTextures[i]->drop(); |
101 | currentTextures.clear(); | 101 | currentTextures.clear(); |
102 | 102 | ||
103 | for (u32 i=0; i<currentImages.size(); ++i) | 103 | for (u32 i=0; i<currentImages.size(); ++i) |
104 | currentImages[i]->drop(); | 104 | currentImages[i]->drop(); |
105 | currentImages.clear(); | 105 | currentImages.clear(); |
106 | 106 | ||
107 | // clear current image mappings | 107 | // clear current image mappings |
108 | CharMap.clear(); | 108 | CharMap.clear(); |
109 | // clear array | 109 | // clear array |
110 | Areas.clear(); | 110 | Areas.clear(); |
111 | 111 | ||
112 | // get information about this font's unicode ranges. | 112 | // get information about this font's unicode ranges. |
113 | s32 size = GetFontUnicodeRanges( dc, 0); | 113 | s32 size = GetFontUnicodeRanges( dc, 0); |
114 | c8 *buf = new c8[size]; | 114 | c8 *buf = new c8[size]; |
115 | LPGLYPHSET glyphs = (LPGLYPHSET)buf; | 115 | LPGLYPHSET glyphs = (LPGLYPHSET)buf; |
116 | 116 | ||
117 | GetFontUnicodeRanges( dc, glyphs); | 117 | GetFontUnicodeRanges( dc, glyphs); |
118 | 118 | ||
119 | // s32 TotalCharCount = glyphs->cGlyphsSupported; | 119 | // s32 TotalCharCount = glyphs->cGlyphsSupported; |
120 | 120 | ||
121 | s32 currentx=0, currenty=0, maxy=0; | 121 | s32 currentx=0, currenty=0, maxy=0; |
122 | 122 | ||
123 | for (u32 range=0; range < glyphs->cRanges; range++) | 123 | for (u32 range=0; range < glyphs->cRanges; range++) |
124 | { | 124 | { |
125 | WCRANGE* current = &glyphs->ranges[range]; | 125 | WCRANGE* current = &glyphs->ranges[range]; |
126 | 126 | ||
127 | //maxy=0; | 127 | //maxy=0; |
128 | 128 | ||
129 | // loop through each glyph and write its size and position | 129 | // loop through each glyph and write its size and position |
130 | for (s32 ch=current->wcLow; ch< current->wcLow + current->cGlyphs; ch++) | 130 | for (s32 ch=current->wcLow; ch< current->wcLow + current->cGlyphs; ch++) |
131 | { | 131 | { |
132 | wchar_t currentchar = ch; | 132 | wchar_t currentchar = ch; |
133 | 133 | ||
134 | if ( IsDBCSLeadByte((BYTE) ch)) | 134 | if ( IsDBCSLeadByte((BYTE) ch)) |
135 | continue; // surragate pairs unsupported | 135 | continue; // surragate pairs unsupported |
136 | 136 | ||
137 | // get the dimensions | 137 | // get the dimensions |
138 | SIZE size; | 138 | SIZE size; |
139 | ABC abc; | 139 | ABC abc; |
140 | GetTextExtentPoint32W(dc, ¤tchar, 1, &size); | 140 | GetTextExtentPoint32W(dc, ¤tchar, 1, &size); |
141 | SFontArea fa; | 141 | SFontArea fa; |
142 | fa.underhang = 0; | 142 | fa.underhang = 0; |
143 | fa.overhang = 0; | 143 | fa.overhang = 0; |
144 | 144 | ||
145 | if (GetCharABCWidthsW(dc, currentchar, currentchar, &abc)) // for unicode fonts, get overhang, underhang, width | 145 | if (GetCharABCWidthsW(dc, currentchar, currentchar, &abc)) // for unicode fonts, get overhang, underhang, width |
146 | { | 146 | { |
147 | size.cx = abc.abcB; | 147 | size.cx = abc.abcB; |
148 | fa.underhang = abc.abcA; | 148 | fa.underhang = abc.abcA; |
149 | fa.overhang = abc.abcC; | 149 | fa.overhang = abc.abcC; |
150 | 150 | ||
151 | if (abc.abcB-abc.abcA+abc.abcC<1) | 151 | if (abc.abcB-abc.abcA+abc.abcC<1) |
152 | continue; // nothing of width 0 | 152 | continue; // nothing of width 0 |
153 | } | 153 | } |
154 | if (size.cy < 1) | 154 | if (size.cy < 1) |
155 | continue; | 155 | continue; |
156 | 156 | ||
157 | //GetGlyphOutline(dc, currentchar, GGO_METRICS, &gm, 0, 0, 0); | 157 | //GetGlyphOutline(dc, currentchar, GGO_METRICS, &gm, 0, 0, 0); |
158 | 158 | ||
159 | //size.cx++; size.cy++; | 159 | //size.cx++; size.cy++; |
160 | 160 | ||
161 | // wrap around? | 161 | // wrap around? |
162 | if (currentx + size.cx > (s32) textureWidth) | 162 | if (currentx + size.cx > (s32) textureWidth) |
163 | { | 163 | { |
164 | currenty += maxy; | 164 | currenty += maxy; |
165 | currentx = 0; | 165 | currentx = 0; |
166 | if ((u32)(currenty + maxy) > textureHeight) | 166 | if ((u32)(currenty + maxy) > textureHeight) |
167 | { | 167 | { |
168 | currentImage++; // increase Image count | 168 | currentImage++; // increase Image count |
169 | currenty=0; | 169 | currenty=0; |
170 | } | 170 | } |
171 | maxy = 0; | 171 | maxy = 0; |
172 | } | 172 | } |
173 | // add this char dimension to the current map | 173 | // add this char dimension to the current map |
174 | 174 | ||
175 | fa.rectangle = core::rect<s32>(currentx, currenty, currentx + size.cx, currenty + size.cy); | 175 | fa.rectangle = core::rect<s32>(currentx, currenty, currentx + size.cx, currenty + size.cy); |
176 | fa.sourceimage = currentImage; | 176 | fa.sourceimage = currentImage; |
177 | 177 | ||
178 | CharMap.insert(currentchar, Areas.size()); | 178 | CharMap.insert(currentchar, Areas.size()); |
179 | Areas.push_back( fa ); | 179 | Areas.push_back( fa ); |
180 | 180 | ||
181 | currentx += size.cx +1; | 181 | currentx += size.cx +1; |
182 | 182 | ||
183 | if (size.cy+1 > maxy) | 183 | if (size.cy+1 > maxy) |
184 | maxy = size.cy+1; | 184 | maxy = size.cy+1; |
185 | } | 185 | } |
186 | } | 186 | } |
187 | currenty += maxy; | 187 | currenty += maxy; |
188 | 188 | ||
189 | u32 lastTextureHeight = getTextureSizeFromSurfaceSize(currenty); | 189 | u32 lastTextureHeight = getTextureSizeFromSurfaceSize(currenty); |
190 | 190 | ||
191 | // delete the glyph set | 191 | // delete the glyph set |
192 | delete [] buf; | 192 | delete [] buf; |
193 | 193 | ||
194 | currentImages.set_used(currentImage+1); | 194 | currentImages.set_used(currentImage+1); |
195 | currentTextures.set_used(currentImage+1); | 195 | currentTextures.set_used(currentImage+1); |
196 | 196 | ||
197 | for (currentImage=0; currentImage < currentImages.size(); ++currentImage) | 197 | for (currentImage=0; currentImage < currentImages.size(); ++currentImage) |
198 | { | 198 | { |
199 | core::stringc logmsg = "Creating image "; | 199 | core::stringc logmsg = "Creating image "; |
200 | logmsg += (s32) (currentImage+1); | 200 | logmsg += (s32) (currentImage+1); |
201 | logmsg += " of "; | 201 | logmsg += " of "; |
202 | logmsg += (s32) currentImages.size(); | 202 | logmsg += (s32) currentImages.size(); |
203 | Device->getLogger()->log(logmsg.c_str()); | 203 | Device->getLogger()->log(logmsg.c_str()); |
204 | // no need for a huge final texture | 204 | // no need for a huge final texture |
205 | u32 texHeight = textureHeight; | 205 | u32 texHeight = textureHeight; |
206 | if (currentImage == currentImages.size()-1 ) | 206 | if (currentImage == currentImages.size()-1 ) |
207 | texHeight = lastTextureHeight; | 207 | texHeight = lastTextureHeight; |
208 | 208 | ||
209 | // make a new bitmap | 209 | // make a new bitmap |
210 | HBITMAP bmp = CreateCompatibleBitmap(dc, textureWidth, texHeight); | 210 | HBITMAP bmp = CreateCompatibleBitmap(dc, textureWidth, texHeight); |
211 | HDC bmpdc = CreateCompatibleDC(dc); | 211 | HDC bmpdc = CreateCompatibleDC(dc); |
212 | 212 | ||
213 | LOGBRUSH lbrush; | 213 | LOGBRUSH lbrush; |
214 | lbrush.lbColor = RGB(0,0,0); | 214 | lbrush.lbColor = RGB(0,0,0); |
215 | lbrush.lbHatch = 0; | 215 | lbrush.lbHatch = 0; |
216 | lbrush.lbStyle = BS_SOLID; | 216 | lbrush.lbStyle = BS_SOLID; |
217 | 217 | ||
218 | HBRUSH brush = CreateBrushIndirect(&lbrush); | 218 | HBRUSH brush = CreateBrushIndirect(&lbrush); |
219 | HPEN pen = CreatePen(PS_NULL, 0, 0); | 219 | HPEN pen = CreatePen(PS_NULL, 0, 0); |
220 | 220 | ||
221 | HGDIOBJ oldbmp = SelectObject(bmpdc, bmp); | 221 | HGDIOBJ oldbmp = SelectObject(bmpdc, bmp); |
222 | HGDIOBJ oldbmppen = SelectObject(bmpdc, pen); | 222 | HGDIOBJ oldbmppen = SelectObject(bmpdc, pen); |
223 | HGDIOBJ oldbmpbrush = SelectObject(bmpdc, brush); | 223 | HGDIOBJ oldbmpbrush = SelectObject(bmpdc, brush); |
224 | HGDIOBJ oldbmpfont = SelectObject(bmpdc, font); | 224 | HGDIOBJ oldbmpfont = SelectObject(bmpdc, font); |
225 | 225 | ||
226 | SetTextColor(bmpdc, RGB(255,255,255)); | 226 | SetTextColor(bmpdc, RGB(255,255,255)); |
227 | 227 | ||
228 | Rectangle(bmpdc, 0,0,textureWidth,texHeight); | 228 | Rectangle(bmpdc, 0,0,textureWidth,texHeight); |
229 | SetBkMode(bmpdc, TRANSPARENT); | 229 | SetBkMode(bmpdc, TRANSPARENT); |
230 | 230 | ||
231 | // draw the letters... | 231 | // draw the letters... |
232 | 232 | ||
233 | // iterate through the tree | 233 | // iterate through the tree |
234 | core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); | 234 | core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); |
235 | while (!it.atEnd()) | 235 | while (!it.atEnd()) |
236 | { | 236 | { |
237 | s32 currentArea = (*it).getValue(); | 237 | s32 currentArea = (*it).getValue(); |
238 | wchar_t wch = (*it).getKey(); | 238 | wchar_t wch = (*it).getKey(); |
239 | // sloppy but I couldnt be bothered rewriting it | 239 | // sloppy but I couldnt be bothered rewriting it |
240 | if (Areas[currentArea].sourceimage == currentImage) | 240 | if (Areas[currentArea].sourceimage == currentImage) |
241 | { | 241 | { |
242 | // draw letter | 242 | // draw letter |
243 | s32 sx = Areas[currentArea].rectangle.UpperLeftCorner.X - Areas[currentArea].underhang; | 243 | s32 sx = Areas[currentArea].rectangle.UpperLeftCorner.X - Areas[currentArea].underhang; |
244 | TextOutW(bmpdc, sx, Areas[currentArea].rectangle.UpperLeftCorner.Y, &wch, 1); | 244 | TextOutW(bmpdc, sx, Areas[currentArea].rectangle.UpperLeftCorner.Y, &wch, 1); |
245 | 245 | ||
246 | // if ascii font... | 246 | // if ascii font... |
247 | //SetPixel(bmpdc, Areas[currentArea].rectangle.UpperLeftCorner.X, Areas[currentArea].rectangle.UpperLeftCorner.Y, RGB(255,255,0));// left upper corner mark | 247 | //SetPixel(bmpdc, Areas[currentArea].rectangle.UpperLeftCorner.X, Areas[currentArea].rectangle.UpperLeftCorner.Y, RGB(255,255,0));// left upper corner mark |
248 | } | 248 | } |
249 | it++; | 249 | it++; |
250 | } | 250 | } |
251 | 251 | ||
252 | // copy the font bitmap into a new irrlicht image | 252 | // copy the font bitmap into a new irrlicht image |
253 | BITMAP b; | 253 | BITMAP b; |
254 | PBITMAPINFO pbmi; | 254 | PBITMAPINFO pbmi; |
255 | WORD cClrBits; | 255 | WORD cClrBits; |
256 | u32 cformat; | 256 | u32 cformat; |
257 | 257 | ||
258 | // Retrieve the bitmap color format, width, and height. | 258 | // Retrieve the bitmap color format, width, and height. |
259 | GetObject(bmp, sizeof(BITMAP), (LPSTR)&b); | 259 | GetObject(bmp, sizeof(BITMAP), (LPSTR)&b); |
260 | 260 | ||
261 | // Convert the color format to a count of bits. | 261 | // Convert the color format to a count of bits. |
262 | cClrBits = (WORD)(b.bmPlanes * b.bmBitsPixel); | 262 | cClrBits = (WORD)(b.bmPlanes * b.bmBitsPixel); |
263 | 263 | ||
264 | if (cClrBits <= 8) // we're not supporting these | 264 | if (cClrBits <= 8) // we're not supporting these |
265 | cformat = -1; | 265 | cformat = -1; |
266 | else if (cClrBits <= 16) | 266 | else if (cClrBits <= 16) |
267 | cformat = video::ECF_A1R5G5B5; | 267 | cformat = video::ECF_A1R5G5B5; |
268 | else if (cClrBits <= 24) | 268 | else if (cClrBits <= 24) |
269 | cformat = video::ECF_R8G8B8; | 269 | cformat = video::ECF_R8G8B8; |
270 | else | 270 | else |
271 | cformat = video::ECF_A8R8G8B8; | 271 | cformat = video::ECF_A8R8G8B8; |
272 | 272 | ||
273 | pbmi = (PBITMAPINFO) LocalAlloc(LPTR, | 273 | pbmi = (PBITMAPINFO) LocalAlloc(LPTR, |
274 | sizeof(BITMAPINFOHEADER)); | 274 | sizeof(BITMAPINFOHEADER)); |
275 | 275 | ||
276 | // Initialize the fields in the BITMAPINFO structure. | 276 | // Initialize the fields in the BITMAPINFO structure. |
277 | 277 | ||
278 | pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); | 278 | pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); |
279 | pbmi->bmiHeader.biWidth = b.bmWidth; | 279 | pbmi->bmiHeader.biWidth = b.bmWidth; |
280 | pbmi->bmiHeader.biHeight = b.bmHeight; | 280 | pbmi->bmiHeader.biHeight = b.bmHeight; |
281 | pbmi->bmiHeader.biPlanes = b.bmPlanes; | 281 | pbmi->bmiHeader.biPlanes = b.bmPlanes; |
282 | pbmi->bmiHeader.biBitCount = b.bmBitsPixel; | 282 | pbmi->bmiHeader.biBitCount = b.bmBitsPixel; |
283 | 283 | ||
284 | // If the bitmap is not compressed, set the BI_RGB flag. | 284 | // If the bitmap is not compressed, set the BI_RGB flag. |
285 | pbmi->bmiHeader.biCompression = BI_RGB; | 285 | pbmi->bmiHeader.biCompression = BI_RGB; |
286 | 286 | ||
287 | // Compute the number of bytes in the array of color | 287 | // Compute the number of bytes in the array of color |
288 | // indices and store the result in biSizeImage. | 288 | // indices and store the result in biSizeImage. |
289 | // For Windows NT, the width must be DWORD aligned unless | 289 | // For Windows NT, the width must be DWORD aligned unless |
290 | // the bitmap is RLE compressed. This example shows this. | 290 | // the bitmap is RLE compressed. This example shows this. |
291 | // For Windows 95/98/Me, the width must be WORD aligned unless the | 291 | // For Windows 95/98/Me, the width must be WORD aligned unless the |
292 | // bitmap is RLE compressed. | 292 | // bitmap is RLE compressed. |
293 | pbmi->bmiHeader.biSizeImage = ((pbmi->bmiHeader.biWidth * cClrBits +31) & ~31) /8 | 293 | pbmi->bmiHeader.biSizeImage = ((pbmi->bmiHeader.biWidth * cClrBits +31) & ~31) /8 |
294 | * pbmi->bmiHeader.biHeight; | 294 | * pbmi->bmiHeader.biHeight; |
295 | // Set biClrImportant to 0, indicating that all of the | 295 | // Set biClrImportant to 0, indicating that all of the |
296 | // device colors are important. | 296 | // device colors are important. |
297 | pbmi->bmiHeader.biClrImportant = 0; | 297 | pbmi->bmiHeader.biClrImportant = 0; |
298 | 298 | ||
299 | LPBYTE lpBits; // memory pointer | 299 | LPBYTE lpBits; // memory pointer |
300 | 300 | ||
301 | PBITMAPINFOHEADER pbih = (PBITMAPINFOHEADER) pbmi; | 301 | PBITMAPINFOHEADER pbih = (PBITMAPINFOHEADER) pbmi; |
302 | lpBits = (LPBYTE) GlobalAlloc(GMEM_FIXED, pbih->biSizeImage); | 302 | lpBits = (LPBYTE) GlobalAlloc(GMEM_FIXED, pbih->biSizeImage); |
303 | 303 | ||
304 | GetDIBits(dc, bmp, 0, (WORD) pbih->biHeight, lpBits, pbmi, DIB_RGB_COLORS); | 304 | GetDIBits(dc, bmp, 0, (WORD) pbih->biHeight, lpBits, pbmi, DIB_RGB_COLORS); |
305 | 305 | ||
306 | // DEBUG- copy to clipboard | 306 | // DEBUG- copy to clipboard |
307 | //OpenClipboard(hWnd); | 307 | //OpenClipboard(hWnd); |
308 | //EmptyClipboard(); | 308 | //EmptyClipboard(); |
309 | //SetClipboardData(CF_BITMAP, bmp); | 309 | //SetClipboardData(CF_BITMAP, bmp); |
310 | //CloseClipboard(); | 310 | //CloseClipboard(); |
311 | 311 | ||
312 | // flip bitmap | 312 | // flip bitmap |
313 | s32 rowsize = ((pbmi->bmiHeader.biWidth * cClrBits +31) & ~31) /8; | 313 | s32 rowsize = ((pbmi->bmiHeader.biWidth * cClrBits +31) & ~31) /8; |
314 | c8 *row = new c8[rowsize]; | 314 | c8 *row = new c8[rowsize]; |
315 | for (s32 i=0; i < (pbih->biHeight/2); ++i) | 315 | for (s32 i=0; i < (pbih->biHeight/2); ++i) |
316 | { | 316 | { |
317 | // grab a row | 317 | // grab a row |
318 | memcpy(row, lpBits + (rowsize * i), rowsize); | 318 | memcpy(row, lpBits + (rowsize * i), rowsize); |
319 | // swap row | 319 | // swap row |
320 | memcpy(lpBits + (rowsize * i), lpBits + ((pbih->biHeight-1 -i) * rowsize ) , rowsize); | 320 | memcpy(lpBits + (rowsize * i), lpBits + ((pbih->biHeight-1 -i) * rowsize ) , rowsize); |
321 | memcpy(lpBits + ((pbih->biHeight-1 -i) * rowsize ), row , rowsize); | 321 | memcpy(lpBits + ((pbih->biHeight-1 -i) * rowsize ), row , rowsize); |
322 | } | 322 | } |
323 | 323 | ||
324 | bool ret = false; | 324 | bool ret = false; |
325 | 325 | ||
326 | if (cformat == video::ECF_A8R8G8B8) | 326 | if (cformat == video::ECF_A8R8G8B8) |
327 | { | 327 | { |
328 | // in this case the font should have an alpha channel, but since windows doesn't draw one | 328 | // in this case the font should have an alpha channel, but since windows doesn't draw one |
329 | // we have to set one manually by going through all the pixels.. *sigh* | 329 | // we have to set one manually by going through all the pixels.. *sigh* |
330 | 330 | ||
331 | u8* m; | 331 | u8* m; |
332 | for (m = lpBits; m < lpBits + pbih->biSizeImage; m+=4) | 332 | for (m = lpBits; m < lpBits + pbih->biSizeImage; m+=4) |
333 | { | 333 | { |
334 | if (UseAlphaChannel) | 334 | if (UseAlphaChannel) |
335 | { | 335 | { |
336 | if (m[0] > 0) // pixel has colour | 336 | if (m[0] > 0) // pixel has colour |
337 | { | 337 | { |
338 | m[3]=m[0]; // set alpha | 338 | m[3]=m[0]; // set alpha |
339 | m[0]=m[1]=m[2] = 255; // everything else is full | 339 | m[0]=m[1]=m[2] = 255; // everything else is full |
340 | } | 340 | } |
341 | } | 341 | } |
342 | else | 342 | else |
343 | m[3]=255; // all pixels are full alpha | 343 | m[3]=255; // all pixels are full alpha |
344 | } | 344 | } |
345 | 345 | ||
346 | } | 346 | } |
347 | else if (cformat == video::ECF_A1R5G5B5) | 347 | else if (cformat == video::ECF_A1R5G5B5) |
348 | { | 348 | { |
349 | u8* m; | 349 | u8* m; |
350 | for (m = lpBits; m < lpBits + pbih->biSizeImage; m+=2) | 350 | for (m = lpBits; m < lpBits + pbih->biSizeImage; m+=2) |
351 | { | 351 | { |
352 | WORD *p = (WORD*)m; | 352 | WORD *p = (WORD*)m; |
353 | if (m[0] > 0 || !UseAlphaChannel) // alpha should be set | 353 | if (m[0] > 0 || !UseAlphaChannel) // alpha should be set |
354 | *p |= 0x8000; // set alpha bit | 354 | *p |= 0x8000; // set alpha bit |
355 | } | 355 | } |
356 | } | 356 | } |
357 | else | 357 | else |
358 | { | 358 | { |
359 | cformat = -1; | 359 | cformat = -1; |
360 | } | 360 | } |
361 | 361 | ||
362 | // make a texture from the image | 362 | // make a texture from the image |
363 | if (cformat != -1) | 363 | if (cformat != -1) |
364 | { | 364 | { |
365 | // turn mip-mapping off | 365 | // turn mip-mapping off |
366 | bool b = Device->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); | 366 | bool b = Device->getVideoDriver()->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS); |
367 | currentImages[currentImage] = Device->getVideoDriver()->createImageFromData((video::ECOLOR_FORMAT)cformat, core::dimension2d<u32>(textureWidth,texHeight), (void*)lpBits); | 367 | currentImages[currentImage] = Device->getVideoDriver()->createImageFromData((video::ECOLOR_FORMAT)cformat, core::dimension2d<u32>(textureWidth,texHeight), (void*)lpBits); |
368 | Device->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS,b); | 368 | Device->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS,b); |
369 | } | 369 | } |
370 | else | 370 | else |
371 | { | 371 | { |
372 | Device->getLogger()->log("Couldn't create font, your pixel format is unsupported."); | 372 | Device->getLogger()->log("Couldn't create font, your pixel format is unsupported."); |
373 | } | 373 | } |
374 | 374 | ||
375 | // free memory and windows resources | 375 | // free memory and windows resources |
376 | // sloppy I know, but I only intended to create one image at first. | 376 | // sloppy I know, but I only intended to create one image at first. |
377 | delete [] row; | 377 | delete [] row; |
378 | LocalFree(pbmi); | 378 | LocalFree(pbmi); |
379 | GlobalFree(lpBits); | 379 | GlobalFree(lpBits); |
380 | DeleteDC(bmpdc); | 380 | DeleteDC(bmpdc); |
381 | DeleteObject(brush); | 381 | DeleteObject(brush); |
382 | DeleteObject(pen); | 382 | DeleteObject(pen); |
383 | DeleteObject(bmp); | 383 | DeleteObject(bmp); |
384 | 384 | ||
385 | if (currentImages[currentImage]) | 385 | if (currentImages[currentImage]) |
386 | { | 386 | { |
387 | // add texture | 387 | // add texture |
388 | currentTextures[currentImage] = Device->getVideoDriver()->addTexture("GUIFontImage",currentImages[currentImage]); | 388 | currentTextures[currentImage] = Device->getVideoDriver()->addTexture("GUIFontImage",currentImages[currentImage]); |
389 | currentTextures[currentImage]->grab(); | 389 | currentTextures[currentImage]->grab(); |
390 | } | 390 | } |
391 | else | 391 | else |
392 | { | 392 | { |
393 | Device->getLogger()->log("Something went wrong, aborting."); | 393 | Device->getLogger()->log("Something went wrong, aborting."); |
394 | // drop all images | 394 | // drop all images |
395 | DeleteObject(font); | 395 | DeleteObject(font); |
396 | return false; | 396 | return false; |
397 | } | 397 | } |
398 | } // looping through each texture | 398 | } // looping through each texture |
399 | DeleteObject(font); | 399 | DeleteObject(font); |
400 | return true; | 400 | return true; |
401 | } | 401 | } |
402 | 402 | ||
403 | #else | 403 | #else |
404 | 404 | ||
405 | CFontTool::CFontTool(IrrlichtDevice *device) : FontSizes(fontsizes), Device(device), UseAlphaChannel(false) | 405 | CFontTool::CFontTool(IrrlichtDevice *device) : FontSizes(fontsizes), Device(device), UseAlphaChannel(false) |
406 | { | 406 | { |
407 | if (!XftInitFtLibrary()) | 407 | if (!XftInitFtLibrary()) |
408 | { | 408 | { |
409 | core::stringc logmsg = "XFT not found\n"; | 409 | core::stringc logmsg = "XFT not found\n"; |
410 | Device->getLogger()->log(logmsg.c_str()); | 410 | Device->getLogger()->log(logmsg.c_str()); |
411 | exit(EXIT_FAILURE); | 411 | exit(EXIT_FAILURE); |
412 | } | 412 | } |
413 | 413 | ||
414 | /* Get a list of the font foundries, storing them in a set to sort */ | 414 | /* Get a list of the font foundries, storing them in a set to sort */ |
415 | std::set<core::stringw> foundries; | 415 | std::set<core::stringw> foundries; |
416 | Display* display = (Display*)Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display; | 416 | Display* display = (Display*)Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display; |
417 | XftFontSet* fonts = XftListFonts(display, DefaultScreen(display), 0, XFT_FOUNDRY, 0); | 417 | XftFontSet* fonts = XftListFonts(display, DefaultScreen(display), 0, XFT_FOUNDRY, 0); |
418 | for (int i = 0; i < fonts->nfont; i++) | 418 | for (int i = 0; i < fonts->nfont; i++) |
419 | { | 419 | { |
420 | char *foundry; | 420 | char *foundry; |
421 | XftPatternGetString(fonts->fonts[i], XFT_FOUNDRY, 0, &foundry); | 421 | XftPatternGetString(fonts->fonts[i], XFT_FOUNDRY, 0, &foundry); |
422 | core::stringw tmp(foundry); | 422 | core::stringw tmp(foundry); |
423 | foundries.insert(tmp); | 423 | foundries.insert(tmp); |
424 | } | 424 | } |
425 | XftFontSetDestroy(fonts); | 425 | XftFontSetDestroy(fonts); |
426 | 426 | ||
427 | /* Copy the sorted list into the array */ | 427 | /* Copy the sorted list into the array */ |
428 | CharSets.clear(); | 428 | CharSets.clear(); |
429 | for (std::set<core::stringw>::iterator i = foundries.begin(); i != foundries.end(); i++) | 429 | for (std::set<core::stringw>::iterator i = foundries.begin(); i != foundries.end(); i++) |
430 | CharSets.push_back((*i).c_str()); | 430 | CharSets.push_back((*i).c_str()); |
431 | selectCharSet(0); | 431 | selectCharSet(0); |
432 | } | 432 | } |
433 | 433 | ||
434 | /* Note: There must be some trick for using strings as pattern parameters to XftListFonts because | 434 | /* Note: There must be some trick for using strings as pattern parameters to XftListFonts because |
435 | no matter how I specify a string, I end up with an intermittent segfault. Since XftFontList is | 435 | no matter how I specify a string, I end up with an intermittent segfault. Since XftFontList is |
436 | just calling FcFontList, that's what I'll do too since that works OK */ | 436 | just calling FcFontList, that's what I'll do too since that works OK */ |
437 | void CFontTool::selectCharSet(u32 currentCharSet) | 437 | void CFontTool::selectCharSet(u32 currentCharSet) |
438 | { | 438 | { |
439 | /* Get a list of the font families, storing them in a set to sort */ | 439 | /* Get a list of the font families, storing them in a set to sort */ |
440 | char foundry[256]; | 440 | char foundry[256]; |
441 | sprintf(&foundry[0],"%ls",CharSets[currentCharSet].c_str()); | 441 | sprintf(&foundry[0],"%ls",CharSets[currentCharSet].c_str()); |
442 | std::set<core::stringw> families; | 442 | std::set<core::stringw> families; |
443 | XftPattern *pattern = FcPatternCreate(); | 443 | XftPattern *pattern = FcPatternCreate(); |
444 | XftPatternAddString(pattern, FC_FOUNDRY, &foundry[0]); | 444 | XftPatternAddString(pattern, FC_FOUNDRY, &foundry[0]); |
445 | XftObjectSet *objectset = FcObjectSetCreate(); | 445 | XftObjectSet *objectset = FcObjectSetCreate(); |
446 | XftObjectSetAdd(objectset, XFT_FOUNDRY); | 446 | XftObjectSetAdd(objectset, XFT_FOUNDRY); |
447 | XftObjectSetAdd(objectset, XFT_FAMILY); | 447 | XftObjectSetAdd(objectset, XFT_FAMILY); |
448 | FcFontSet *fonts = FcFontList(NULL, pattern, objectset); | 448 | FcFontSet *fonts = FcFontList(NULL, pattern, objectset); |
449 | 449 | ||
450 | for (int i = 0; i < fonts->nfont; i++) | 450 | for (int i = 0; i < fonts->nfont; i++) |
451 | { | 451 | { |
452 | char* ptr; | 452 | char* ptr; |
453 | XftPatternGetString(fonts->fonts[i], XFT_FAMILY, 0, &ptr); | 453 | XftPatternGetString(fonts->fonts[i], XFT_FAMILY, 0, &ptr); |
454 | core::stringw family(ptr); | 454 | core::stringw family(ptr); |
455 | families.insert(family); | 455 | families.insert(family); |
456 | } | 456 | } |
457 | XftPatternDestroy(pattern); | 457 | XftPatternDestroy(pattern); |
458 | FcObjectSetDestroy(objectset); | 458 | FcObjectSetDestroy(objectset); |
459 | 459 | ||
460 | /* Copy the sorted list into the array */ | 460 | /* Copy the sorted list into the array */ |
461 | FontNames.clear(); | 461 | FontNames.clear(); |
462 | for (std::set<core::stringw>::iterator i = families.begin(); i != families.end(); i++) | 462 | for (std::set<core::stringw>::iterator i = families.begin(); i != families.end(); i++) |
463 | FontNames.push_back((*i).c_str()); | 463 | FontNames.push_back((*i).c_str()); |
464 | } | 464 | } |
465 | 465 | ||
466 | bool CFontTool::makeBitmapFont(u32 fontIndex, u32 charsetIndex, s32 fontSize, u32 textureWidth, u32 textureHeight, bool bold, bool italic, bool aa, bool alpha) | 466 | bool CFontTool::makeBitmapFont(u32 fontIndex, u32 charsetIndex, s32 fontSize, u32 textureWidth, u32 textureHeight, bool bold, bool italic, bool aa, bool alpha) |
467 | { | 467 | { |
468 | if (fontIndex >= FontNames.size() || charsetIndex >= CharSets.size() ) | 468 | if (fontIndex >= FontNames.size() || charsetIndex >= CharSets.size() ) |
469 | return false; | 469 | return false; |
470 | 470 | ||
471 | Display *display = (Display*) Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display; | 471 | Display *display = (Display*) Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display; |
472 | u32 screen = DefaultScreen(display); | 472 | u32 screen = DefaultScreen(display); |
473 | Window win = RootWindow(display, screen); | 473 | Window win = RootWindow(display, screen); |
474 | Visual *visual = DefaultVisual(display, screen); | 474 | Visual *visual = DefaultVisual(display, screen); |
475 | UseAlphaChannel = alpha; | 475 | UseAlphaChannel = alpha; |
476 | u32 currentImage = 0; | 476 | u32 currentImage = 0; |
477 | 477 | ||
478 | XftResult result; | 478 | XftResult result; |
479 | XftPattern *request = XftPatternCreate(); | 479 | XftPattern *request = XftPatternCreate(); |
480 | char foundry[256], family[256]; | 480 | char foundry[256], family[256]; |
481 | sprintf(&foundry[0],"%ls",CharSets[charsetIndex].c_str()); | 481 | sprintf(&foundry[0],"%ls",CharSets[charsetIndex].c_str()); |
482 | sprintf(&family[0],"%ls",FontNames[fontIndex].c_str()); | 482 | sprintf(&family[0],"%ls",FontNames[fontIndex].c_str()); |
483 | XftPatternAddString(request, XFT_FOUNDRY, &foundry[0]); | 483 | XftPatternAddString(request, XFT_FOUNDRY, &foundry[0]); |
484 | XftPatternAddString(request, XFT_FAMILY, &family[0]); | 484 | XftPatternAddString(request, XFT_FAMILY, &family[0]); |
485 | XftPatternAddInteger(request, XFT_PIXEL_SIZE, fontSize); | 485 | XftPatternAddInteger(request, XFT_PIXEL_SIZE, fontSize); |
486 | XftPatternAddInteger(request, XFT_WEIGHT, bold ? XFT_WEIGHT_BLACK : XFT_WEIGHT_LIGHT); | 486 | XftPatternAddInteger(request, XFT_WEIGHT, bold ? XFT_WEIGHT_BLACK : XFT_WEIGHT_LIGHT); |
487 | XftPatternAddInteger(request, XFT_SLANT, italic ? XFT_SLANT_ITALIC : XFT_SLANT_ROMAN); | 487 | XftPatternAddInteger(request, XFT_SLANT, italic ? XFT_SLANT_ITALIC : XFT_SLANT_ROMAN); |
488 | XftPatternAddBool(request, XFT_ANTIALIAS, aa); | 488 | XftPatternAddBool(request, XFT_ANTIALIAS, aa); |
489 | 489 | ||
490 | /* Find the closest font that matches the user choices and open it and check if the returned | 490 | /* Find the closest font that matches the user choices and open it and check if the returned |
491 | font has anti aliasing enabled by default, even if it wasn't requested */ | 491 | font has anti aliasing enabled by default, even if it wasn't requested */ |
492 | FcBool aaEnabled; | 492 | FcBool aaEnabled; |
493 | XftPattern *found = XftFontMatch(display, DefaultScreen(display), request, &result); | 493 | XftPattern *found = XftFontMatch(display, DefaultScreen(display), request, &result); |
494 | XftPatternGetBool(found, XFT_ANTIALIAS, 0, &aaEnabled); | 494 | XftPatternGetBool(found, XFT_ANTIALIAS, 0, &aaEnabled); |
495 | aa = aaEnabled; | 495 | aa = aaEnabled; |
496 | XftFont *font = XftFontOpenPattern(display, found); | 496 | XftFont *font = XftFontOpenPattern(display, found); |
497 | 497 | ||
498 | // get rid of the current textures/images | 498 | // get rid of the current textures/images |
499 | for (u32 i=0; i<currentTextures.size(); ++i) | 499 | for (u32 i=0; i<currentTextures.size(); ++i) |
500 | currentTextures[i]->drop(); | 500 | currentTextures[i]->drop(); |
501 | currentTextures.clear(); | 501 | currentTextures.clear(); |
502 | for (u32 i=0; i<currentImages.size(); ++i) | 502 | for (u32 i=0; i<currentImages.size(); ++i) |
503 | currentImages[i]->drop(); | 503 | currentImages[i]->drop(); |
504 | currentImages.clear(); | 504 | currentImages.clear(); |
505 | CharMap.clear(); | 505 | CharMap.clear(); |
506 | Areas.clear(); | 506 | Areas.clear(); |
507 | 507 | ||
508 | /* Calculate the max height of the font. Annoyingly, it seems that the height property of the font | 508 | /* Calculate the max height of the font. Annoyingly, it seems that the height property of the font |
509 | is the maximum height of any single character, but a string of characters, aligned along their | 509 | is the maximum height of any single character, but a string of characters, aligned along their |
510 | baselines, can exceed this figure. Because I don't know any better way of doing it, I'm going to | 510 | baselines, can exceed this figure. Because I don't know any better way of doing it, I'm going to |
511 | have to use the brute force method. | 511 | have to use the brute force method. |
512 | 512 | ||
513 | Note: There will be a certain number of charters in a font, however they may not be grouped | 513 | Note: There will be a certain number of charters in a font, however they may not be grouped |
514 | consecutively, and could in fact be spread out with many gaps */ | 514 | consecutively, and could in fact be spread out with many gaps */ |
515 | u32 maxY = 0; | 515 | u32 maxY = 0; |
516 | u32 charsFound = 0; | 516 | u32 charsFound = 0; |
517 | for (FT_UInt charCode = 0; charsFound < FcCharSetCount(font->charset); charCode++) | 517 | for (FT_UInt charCode = 0; charsFound < FcCharSetCount(font->charset); charCode++) |
518 | { | 518 | { |
519 | if (!XftCharExists(display, font, charCode)) | 519 | if (!XftCharExists(display, font, charCode)) |
520 | continue; | 520 | continue; |
521 | 521 | ||
522 | charsFound++; | 522 | charsFound++; |
523 | 523 | ||
524 | XGlyphInfo extents; | 524 | XGlyphInfo extents; |
525 | XftTextExtents32(display, font, &charCode, 1, &extents); | 525 | XftTextExtents32(display, font, &charCode, 1, &extents); |
526 | if ((extents.xOff <= 0) && (extents.height <= 0)) | 526 | if ((extents.xOff <= 0) && (extents.height <= 0)) |
527 | continue; | 527 | continue; |
528 | 528 | ||
529 | /* Calculate the width and height, adding 1 extra pixel if anti aliasing is enabled */ | 529 | /* Calculate the width and height, adding 1 extra pixel if anti aliasing is enabled */ |
530 | u32 chWidth = extents.xOff + (aa ? 1 : 0); | 530 | u32 chWidth = extents.xOff + (aa ? 1 : 0); |
531 | u32 chHeight = (font->ascent - extents.y + extents.height) + (aa ? 1 : 0); | 531 | u32 chHeight = (font->ascent - extents.y + extents.height) + (aa ? 1 : 0); |
532 | if (chHeight > maxY) | 532 | if (chHeight > maxY) |
533 | maxY = chHeight; | 533 | maxY = chHeight; |
534 | 534 | ||
535 | /* Store the character details here */ | 535 | /* Store the character details here */ |
536 | SFontArea fontArea; | 536 | SFontArea fontArea; |
537 | fontArea.rectangle = core::rect<s32>(0, 0, chWidth, chHeight); | 537 | fontArea.rectangle = core::rect<s32>(0, 0, chWidth, chHeight); |
538 | CharMap.insert(charCode, Areas.size()); | 538 | CharMap.insert(charCode, Areas.size()); |
539 | Areas.push_back(fontArea); | 539 | Areas.push_back(fontArea); |
540 | } | 540 | } |
541 | core::stringc logmsg = "Found "; | 541 | core::stringc logmsg = "Found "; |
542 | logmsg += (s32) (CharMap.size() + 1); | 542 | logmsg += (s32) (CharMap.size() + 1); |
543 | logmsg += " characters"; | 543 | logmsg += " characters"; |
544 | Device->getLogger()->log(logmsg.c_str()); | 544 | Device->getLogger()->log(logmsg.c_str()); |
545 | 545 | ||
546 | /* Get the size of the chars and allocate them a position on a texture. If the next character that | 546 | /* Get the size of the chars and allocate them a position on a texture. If the next character that |
547 | is added would be outside the width or height of the texture, then a new texture is added */ | 547 | is added would be outside the width or height of the texture, then a new texture is added */ |
548 | u32 currentX = 0, currentY = 0, rowY = 0; | 548 | u32 currentX = 0, currentY = 0, rowY = 0; |
549 | for (core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); !it.atEnd(); it++) | 549 | for (core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); !it.atEnd(); it++) |
550 | { | 550 | { |
551 | s32 currentArea = (*it).getValue(); | 551 | s32 currentArea = (*it).getValue(); |
552 | SFontArea *fontArea = &Areas[currentArea]; | 552 | SFontArea *fontArea = &Areas[currentArea]; |
553 | u32 chWidth = fontArea->rectangle.LowerRightCorner.X; | 553 | u32 chWidth = fontArea->rectangle.LowerRightCorner.X; |
554 | u32 chHeight = fontArea->rectangle.LowerRightCorner.Y; | 554 | u32 chHeight = fontArea->rectangle.LowerRightCorner.Y; |
555 | 555 | ||
556 | /* If the width of this char will exceed the textureWidth then start a new row */ | 556 | /* If the width of this char will exceed the textureWidth then start a new row */ |
557 | if ((currentX + chWidth) > textureWidth) | 557 | if ((currentX + chWidth) > textureWidth) |
558 | { | 558 | { |
559 | currentY += rowY; | 559 | currentY += rowY; |
560 | currentX = 0; | 560 | currentX = 0; |
561 | 561 | ||
562 | /* If the new row added to the texture exceeds the textureHeight then start a new texture */ | 562 | /* If the new row added to the texture exceeds the textureHeight then start a new texture */ |
563 | if ((currentY + rowY) > textureHeight) | 563 | if ((currentY + rowY) > textureHeight) |
564 | { | 564 | { |
565 | currentImage++; | 565 | currentImage++; |
566 | currentY = 0; | 566 | currentY = 0; |
567 | } | 567 | } |
568 | rowY = 0; | 568 | rowY = 0; |
569 | } | 569 | } |
570 | 570 | ||
571 | /* Update the area with the current x and y and texture */ | 571 | /* Update the area with the current x and y and texture */ |
572 | fontArea->rectangle = core::rect<s32>(currentX, currentY, currentX + chWidth, currentY + chHeight); | 572 | fontArea->rectangle = core::rect<s32>(currentX, currentY, currentX + chWidth, currentY + chHeight); |
573 | fontArea->sourceimage = currentImage; | 573 | fontArea->sourceimage = currentImage; |
574 | currentX += chWidth + 1; | 574 | currentX += chWidth + 1; |
575 | if (chHeight + 1 > rowY) | 575 | if (chHeight + 1 > rowY) |
576 | rowY = chHeight + 1; | 576 | rowY = chHeight + 1; |
577 | } | 577 | } |
578 | 578 | ||
579 | /* The last row of chars and the last texture weren't accounted for in the loop, so add them here */ | 579 | /* The last row of chars and the last texture weren't accounted for in the loop, so add them here */ |
580 | currentY += rowY; | 580 | currentY += rowY; |
581 | u32 lastTextureHeight = getTextureSizeFromSurfaceSize(currentY); | 581 | u32 lastTextureHeight = getTextureSizeFromSurfaceSize(currentY); |
582 | currentImages.set_used(currentImage + 1); | 582 | currentImages.set_used(currentImage + 1); |
583 | currentTextures.set_used(currentImage + 1); | 583 | currentTextures.set_used(currentImage + 1); |
584 | 584 | ||
585 | /* Initialise colours */ | 585 | /* Initialise colours */ |
586 | XftColor colFore, colBack; | 586 | XftColor colFore, colBack; |
587 | XRenderColor xFore = {0xffff, 0xffff, 0xffff, 0xffff}; | 587 | XRenderColor xFore = {0xffff, 0xffff, 0xffff, 0xffff}; |
588 | XRenderColor xBack = {0x0000, 0x0000, 0x0000, 0xffff}; | 588 | XRenderColor xBack = {0x0000, 0x0000, 0x0000, 0xffff}; |
589 | XftColorAllocValue(display, DefaultVisual(display, screen), DefaultColormap(display, screen), &xFore, &colFore); | 589 | XftColorAllocValue(display, DefaultVisual(display, screen), DefaultColormap(display, screen), &xFore, &colFore); |
590 | XftColorAllocValue(display, DefaultVisual(display, screen), DefaultColormap(display, screen), &xBack, &colBack); | 590 | XftColorAllocValue(display, DefaultVisual(display, screen), DefaultColormap(display, screen), &xBack, &colBack); |
591 | 591 | ||
592 | /* Create a pixmap that is large enough to hold any character in the font */ | 592 | /* Create a pixmap that is large enough to hold any character in the font */ |
593 | Pixmap pixmap = XCreatePixmap(display, win, textureWidth, maxY, DefaultDepth(display, screen)); | 593 | Pixmap pixmap = XCreatePixmap(display, win, textureWidth, maxY, DefaultDepth(display, screen)); |
594 | XftDraw *draw = XftDrawCreate(display, pixmap, visual, DefaultColormap(display, screen)); | 594 | XftDraw *draw = XftDrawCreate(display, pixmap, visual, DefaultColormap(display, screen)); |
595 | 595 | ||
596 | /* Render the chars */ | 596 | /* Render the chars */ |
597 | for (currentImage = 0; currentImage < currentImages.size(); ++currentImage) | 597 | for (currentImage = 0; currentImage < currentImages.size(); ++currentImage) |
598 | { | 598 | { |
599 | core::stringc logmsg = "Creating image "; | 599 | core::stringc logmsg = "Creating image "; |
600 | logmsg += (s32) (currentImage+1); | 600 | logmsg += (s32) (currentImage+1); |
601 | logmsg += " of "; | 601 | logmsg += " of "; |
602 | logmsg += (s32) currentImages.size(); | 602 | logmsg += (s32) currentImages.size(); |
603 | Device->getLogger()->log(logmsg.c_str()); | 603 | Device->getLogger()->log(logmsg.c_str()); |
604 | 604 | ||
605 | /* The last texture that is saved is vertically shrunk to fit the characters drawn on it */ | 605 | /* The last texture that is saved is vertically shrunk to fit the characters drawn on it */ |
606 | u32 texHeight = textureHeight; | 606 | u32 texHeight = textureHeight; |
607 | if (currentImage == currentImages.size() - 1) | 607 | if (currentImage == currentImages.size() - 1) |
608 | texHeight = lastTextureHeight; | 608 | texHeight = lastTextureHeight; |
609 | 609 | ||
610 | /* The texture that holds this "page" of characters */ | 610 | /* The texture that holds this "page" of characters */ |
611 | currentImages[currentImage] = Device->getVideoDriver()->createImage(video::ECF_A8R8G8B8, core::dimension2du(textureWidth, texHeight)); | 611 | currentImages[currentImage] = Device->getVideoDriver()->createImage(video::ECF_A8R8G8B8, core::dimension2du(textureWidth, texHeight)); |
612 | currentImages[currentImage]->fill(video::SColor(alpha ? 0 : 255,0,0,0)); | 612 | currentImages[currentImage]->fill(video::SColor(alpha ? 0 : 255,0,0,0)); |
613 | 613 | ||
614 | for (core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); !it.atEnd(); it++) | 614 | for (core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); !it.atEnd(); it++) |
615 | { | 615 | { |
616 | FcChar32 wch = (*it).getKey(); | 616 | FcChar32 wch = (*it).getKey(); |
617 | s32 currentArea = (*it).getValue(); | 617 | s32 currentArea = (*it).getValue(); |
618 | if (Areas[currentArea].sourceimage == currentImage) | 618 | if (Areas[currentArea].sourceimage == currentImage) |
619 | { | 619 | { |
620 | SFontArea *fontArea = &Areas[currentArea]; | 620 | SFontArea *fontArea = &Areas[currentArea]; |
621 | u32 chWidth = fontArea->rectangle.LowerRightCorner.X - fontArea->rectangle.UpperLeftCorner.X; | 621 | u32 chWidth = fontArea->rectangle.LowerRightCorner.X - fontArea->rectangle.UpperLeftCorner.X; |
622 | u32 chHeight = fontArea->rectangle.LowerRightCorner.Y - fontArea->rectangle.UpperLeftCorner.Y; | 622 | u32 chHeight = fontArea->rectangle.LowerRightCorner.Y - fontArea->rectangle.UpperLeftCorner.Y; |
623 | 623 | ||
624 | /* Draw the glyph onto the pixmap */ | 624 | /* Draw the glyph onto the pixmap */ |
625 | XGlyphInfo extents; | 625 | XGlyphInfo extents; |
626 | XftDrawRect(draw, &colBack, 0, 0, chWidth, chHeight); | 626 | XftDrawRect(draw, &colBack, 0, 0, chWidth, chHeight); |
627 | XftTextExtents32(display, font, &wch, 1, &extents); | 627 | XftTextExtents32(display, font, &wch, 1, &extents); |
628 | XftDrawString32(draw, &colFore, font, extents.x, extents.y, &wch, 1); | 628 | XftDrawString32(draw, &colFore, font, extents.x, extents.y, &wch, 1); |
629 | 629 | ||
630 | /* Convert the pixmap into an image, then copy it onto the Irrlicht texture, pixel by pixel. | 630 | /* Convert the pixmap into an image, then copy it onto the Irrlicht texture, pixel by pixel. |
631 | There's bound to be a faster way, but this is adequate */ | 631 | There's bound to be a faster way, but this is adequate */ |
632 | u32 xDest = fontArea->rectangle.UpperLeftCorner.X; | 632 | u32 xDest = fontArea->rectangle.UpperLeftCorner.X; |
633 | u32 yDest = fontArea->rectangle.UpperLeftCorner.Y + font->ascent - extents.y; | 633 | u32 yDest = fontArea->rectangle.UpperLeftCorner.Y + font->ascent - extents.y; |
634 | XImage *image = XGetImage(display, pixmap, 0, 0, chWidth, chHeight, 0xffffff, XYPixmap); | 634 | XImage *image = XGetImage(display, pixmap, 0, 0, chWidth, chHeight, 0xffffff, XYPixmap); |
635 | if (image) | 635 | if (image) |
636 | { | 636 | { |
637 | for (u32 ySrc = 0; ySrc < chHeight; ySrc++) | 637 | for (u32 ySrc = 0; ySrc < chHeight; ySrc++) |
638 | for (u32 xSrc = 0; xSrc < chWidth; xSrc++) | 638 | for (u32 xSrc = 0; xSrc < chWidth; xSrc++) |
639 | { | 639 | { |
640 | /* Get the pixel colour and break it down into rgb components */ | 640 | /* Get the pixel colour and break it down into rgb components */ |
641 | u32 col = XGetPixel(image, xSrc, ySrc); | 641 | u32 col = XGetPixel(image, xSrc, ySrc); |
642 | u32 a = 255; | 642 | u32 a = 255; |
643 | u32 r = col & visual->red_mask; | 643 | u32 r = col & visual->red_mask; |
644 | u32 g = col & visual->green_mask; | 644 | u32 g = col & visual->green_mask; |
645 | u32 b = col & visual->blue_mask; | 645 | u32 b = col & visual->blue_mask; |
646 | while (r > 0xff) r >>= 8; | 646 | while (r > 0xff) r >>= 8; |
647 | while (g > 0xff) g >>= 8; | 647 | while (g > 0xff) g >>= 8; |
648 | while (b > 0xff) b >>= 8; | 648 | while (b > 0xff) b >>= 8; |
649 | 649 | ||
650 | /* To make the background transparent, set the colour to 100% white and the alpha to | 650 | /* To make the background transparent, set the colour to 100% white and the alpha to |
651 | the average of the three rgb colour components to maintain the anti-aliasing */ | 651 | the average of the three rgb colour components to maintain the anti-aliasing */ |
652 | if (alpha) | 652 | if (alpha) |
653 | { | 653 | { |
654 | a = (r + g + b) / 3; | 654 | a = (r + g + b) / 3; |
655 | r = 255; | 655 | r = 255; |
656 | g = 255; | 656 | g = 255; |
657 | b = 255; | 657 | b = 255; |
658 | } | 658 | } |
659 | currentImages[currentImage]->setPixel(xDest + xSrc,yDest + ySrc,video::SColor(a,r,g,b)); | 659 | currentImages[currentImage]->setPixel(xDest + xSrc,yDest + ySrc,video::SColor(a,r,g,b)); |
660 | } | 660 | } |
661 | image->f.destroy_image(image); | 661 | image->f.destroy_image(image); |
662 | } | 662 | } |
663 | } | 663 | } |
664 | } | 664 | } |
665 | 665 | ||
666 | /* Add the texture to the list */ | 666 | /* Add the texture to the list */ |
667 | currentTextures[currentImage] = Device->getVideoDriver()->addTexture("GUIFontImage",currentImages[currentImage]); | 667 | currentTextures[currentImage] = Device->getVideoDriver()->addTexture("GUIFontImage",currentImages[currentImage]); |
668 | currentTextures[currentImage]->grab(); | 668 | currentTextures[currentImage]->grab(); |
669 | } | 669 | } |
670 | 670 | ||
671 | XftColorFree (display, visual, DefaultColormap(display, screen), &colFore); | 671 | XftColorFree (display, visual, DefaultColormap(display, screen), &colFore); |
672 | XftColorFree (display, visual, DefaultColormap(display, screen), &colBack); | 672 | XftColorFree (display, visual, DefaultColormap(display, screen), &colBack); |
673 | XftFontClose(display,font); | 673 | XftFontClose(display,font); |
674 | XftPatternDestroy(request); | 674 | XftPatternDestroy(request); |
675 | XftDrawDestroy(draw); | 675 | XftDrawDestroy(draw); |
676 | XFreePixmap(display, pixmap); | 676 | XFreePixmap(display, pixmap); |
677 | return true; | 677 | return true; |
678 | } | 678 | } |
679 | #endif | 679 | #endif |
680 | 680 | ||
681 | CFontTool::~CFontTool() | 681 | CFontTool::~CFontTool() |
682 | { | 682 | { |
683 | #ifdef _IRR_WINDOWS_ | 683 | #ifdef _IRR_WINDOWS_ |
684 | // destroy display context | 684 | // destroy display context |
685 | if (dc) | 685 | if (dc) |
686 | DeleteDC(dc); | 686 | DeleteDC(dc); |
687 | #endif | 687 | #endif |
688 | 688 | ||
689 | // drop textures+images | 689 | // drop textures+images |
690 | for (u32 i=0; i<currentTextures.size(); ++i) | 690 | for (u32 i=0; i<currentTextures.size(); ++i) |
691 | currentTextures[i]->drop(); | 691 | currentTextures[i]->drop(); |
692 | currentTextures.clear(); | 692 | currentTextures.clear(); |
693 | 693 | ||
694 | for (u32 i=0; i<currentImages.size(); ++i) | 694 | for (u32 i=0; i<currentImages.size(); ++i) |
695 | currentImages[i]->drop(); | 695 | currentImages[i]->drop(); |
696 | currentImages.clear(); | 696 | currentImages.clear(); |
697 | } | 697 | } |
698 | 698 | ||
699 | bool CFontTool::saveBitmapFont(const c8 *filename, const c8* format) | 699 | bool CFontTool::saveBitmapFont(const c8 *filename, const c8* format) |
700 | { | 700 | { |
701 | if (currentImages.size() == 0) | 701 | if (currentImages.size() == 0) |
702 | { | 702 | { |
703 | Device->getLogger()->log("No image data to write, aborting."); | 703 | Device->getLogger()->log("No image data to write, aborting."); |
704 | return false; | 704 | return false; |
705 | } | 705 | } |
706 | 706 | ||
707 | core::stringc fn = filename; | 707 | core::stringc fn = filename; |
708 | core::stringc imagename = filename; | 708 | core::stringc imagename = filename; |
709 | fn += ".xml"; | 709 | fn += ".xml"; |
710 | 710 | ||
711 | io::IXMLWriter *writer = Device->getFileSystem()->createXMLWriter(fn.c_str()); | 711 | io::IXMLWriter *writer = Device->getFileSystem()->createXMLWriter(fn.c_str()); |
712 | 712 | ||
713 | // header and line breaks | 713 | // header and line breaks |
714 | writer->writeXMLHeader(); | 714 | writer->writeXMLHeader(); |
715 | writer->writeLineBreak(); | 715 | writer->writeLineBreak(); |
716 | 716 | ||
717 | // write information | 717 | // write information |
718 | writer->writeElement(L"font", false, L"type", L"bitmap"); | 718 | writer->writeElement(L"font", false, L"type", L"bitmap"); |
719 | writer->writeLineBreak(); | 719 | writer->writeLineBreak(); |
720 | writer->writeLineBreak(); | 720 | writer->writeLineBreak(); |
721 | 721 | ||
722 | // write images and link to them | 722 | // write images and link to them |
723 | for (u32 i=0; i<currentImages.size(); ++i) | 723 | for (u32 i=0; i<currentImages.size(); ++i) |
724 | { | 724 | { |
725 | imagename = filename; | 725 | imagename = filename; |
726 | imagename += (s32)i; | 726 | imagename += (s32)i; |
727 | imagename += "."; | 727 | imagename += "."; |
728 | imagename += format; | 728 | imagename += format; |
729 | Device->getVideoDriver()->writeImageToFile(currentImages[i],imagename.c_str()); | 729 | Device->getVideoDriver()->writeImageToFile(currentImages[i],imagename.c_str()); |
730 | 730 | ||
731 | writer->writeElement(L"Texture", true, | 731 | writer->writeElement(L"Texture", true, |
732 | L"index", core::stringw(i).c_str(), | 732 | L"index", core::stringw(i).c_str(), |
733 | L"filename", core::stringw(imagename.c_str()).c_str(), | 733 | L"filename", core::stringw(imagename.c_str()).c_str(), |
734 | L"hasAlpha", UseAlphaChannel ? L"true" : L"false"); | 734 | L"hasAlpha", UseAlphaChannel ? L"true" : L"false"); |
735 | writer->writeLineBreak(); | 735 | writer->writeLineBreak(); |
736 | } | 736 | } |
737 | 737 | ||
738 | writer->writeLineBreak(); | 738 | writer->writeLineBreak(); |
739 | 739 | ||
740 | // write each character | 740 | // write each character |
741 | core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); | 741 | core::map<wchar_t, u32>::Iterator it = CharMap.getIterator(); |
742 | while (!it.atEnd()) | 742 | while (!it.atEnd()) |
743 | { | 743 | { |
744 | SFontArea &fa = Areas[(*it).getValue()]; | 744 | SFontArea &fa = Areas[(*it).getValue()]; |
745 | 745 | ||
746 | wchar_t c[2]; | 746 | wchar_t c[2]; |
747 | c[0] = (*it).getKey(); | 747 | c[0] = (*it).getKey(); |
748 | c[1] = L'\0'; | 748 | c[1] = L'\0'; |
749 | core::stringw area, under, over, image; | 749 | core::stringw area, under, over, image; |
750 | area = core::stringw(fa.rectangle.UpperLeftCorner.X); | 750 | area = core::stringw(fa.rectangle.UpperLeftCorner.X); |
751 | area += L", "; | 751 | area += L", "; |
752 | area += fa.rectangle.UpperLeftCorner.Y; | 752 | area += fa.rectangle.UpperLeftCorner.Y; |
753 | area += L", "; | 753 | area += L", "; |
754 | area += fa.rectangle.LowerRightCorner.X; | 754 | area += fa.rectangle.LowerRightCorner.X; |
755 | area += L", "; | 755 | area += L", "; |
756 | area += fa.rectangle.LowerRightCorner.Y; | 756 | area += fa.rectangle.LowerRightCorner.Y; |
757 | 757 | ||
758 | core::array<core::stringw> names; | 758 | core::array<core::stringw> names; |
759 | core::array<core::stringw> values; | 759 | core::array<core::stringw> values; |
760 | names.clear(); | 760 | names.clear(); |
761 | values.clear(); | 761 | values.clear(); |
762 | // char | 762 | // char |
763 | names.push_back(core::stringw(L"c")); | 763 | names.push_back(core::stringw(L"c")); |
764 | values.push_back(core::stringw(c)); | 764 | values.push_back(core::stringw(c)); |
765 | // image number | 765 | // image number |
766 | if (fa.sourceimage != 0) | 766 | if (fa.sourceimage != 0) |
767 | { | 767 | { |
768 | image = core::stringw(fa.sourceimage); | 768 | image = core::stringw(fa.sourceimage); |
769 | names.push_back(core::stringw(L"i")); | 769 | names.push_back(core::stringw(L"i")); |
770 | values.push_back(image); | 770 | values.push_back(image); |
771 | } | 771 | } |
772 | // rectangle | 772 | // rectangle |
773 | names.push_back(core::stringw(L"r")); | 773 | names.push_back(core::stringw(L"r")); |
774 | values.push_back(area); | 774 | values.push_back(area); |
775 | 775 | ||
776 | if (fa.underhang != 0) | 776 | if (fa.underhang != 0) |
777 | { | 777 | { |
778 | under = core::stringw(fa.underhang); | 778 | under = core::stringw(fa.underhang); |
779 | names.push_back(core::stringw(L"u")); | 779 | names.push_back(core::stringw(L"u")); |
780 | values.push_back(under); | 780 | values.push_back(under); |
781 | } | 781 | } |
782 | if (fa.overhang != 0) | 782 | if (fa.overhang != 0) |
783 | { | 783 | { |
784 | over = core::stringw(fa.overhang); | 784 | over = core::stringw(fa.overhang); |
785 | names.push_back(core::stringw(L"o")); | 785 | names.push_back(core::stringw(L"o")); |
786 | values.push_back(over); | 786 | values.push_back(over); |
787 | } | 787 | } |
788 | writer->writeElement(L"c", true, names, values); | 788 | writer->writeElement(L"c", true, names, values); |
789 | 789 | ||
790 | writer->writeLineBreak(); | 790 | writer->writeLineBreak(); |
791 | it++; | 791 | it++; |
792 | } | 792 | } |
793 | 793 | ||
794 | writer->writeClosingTag(L"font"); | 794 | writer->writeClosingTag(L"font"); |
795 | 795 | ||
796 | writer->drop(); | 796 | writer->drop(); |
797 | 797 | ||
798 | Device->getLogger()->log("Bitmap font saved."); | 798 | Device->getLogger()->log("Bitmap font saved."); |
799 | 799 | ||
800 | return true; | 800 | return true; |
801 | } | 801 | } |
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__ |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CVectorFontTool.h b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CVectorFontTool.h index 05a9c79..c139f3d 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CVectorFontTool.h +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/CVectorFontTool.h | |||
@@ -1,1199 +1,1199 @@ | |||
1 | /* | 1 | /* |
2 | Vector font tool - Gaz Davidson December 2006-2012 | 2 | Vector font tool - Gaz Davidson December 2006-2012 |
3 | 3 | ||
4 | I noticed bitmap fonts were taking massive amounts of video memory at reasonable sizes, | 4 | I noticed bitmap fonts were taking massive amounts of video memory at reasonable sizes, |
5 | so I decided to make a vector font. I always wanted to try converting pixels to triangles... | 5 | so I decided to make a vector font. I always wanted to try converting pixels to triangles... |
6 | 6 | ||
7 | And I failed! This is a collection of the ugliest, bloated, most inneficient algorithms | 7 | And I failed! This is a collection of the ugliest, bloated, most inneficient algorithms |
8 | i've ever written, but its kinda working so I'm not changing it. | 8 | i've ever written, but its kinda working so I'm not changing it. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __VECTOR_FONT_TOOL_INCLUDED__ | 11 | #ifndef __VECTOR_FONT_TOOL_INCLUDED__ |
12 | #define __VECTOR_FONT_TOOL_INCLUDED__ | 12 | #define __VECTOR_FONT_TOOL_INCLUDED__ |
13 | 13 | ||
14 | #include "irrlicht.h" | 14 | #include "irrlicht.h" |
15 | #include "CFontTool.h" | 15 | #include "CFontTool.h" |
16 | #include <assert.h> | 16 | #include <assert.h> |
17 | 17 | ||
18 | using namespace irr; | 18 | using namespace irr; |
19 | using namespace video; | 19 | using namespace video; |
20 | 20 | ||
21 | struct STriangleList | 21 | struct STriangleList |
22 | { | 22 | { |
23 | core::array<core::vector2df> positions; | 23 | core::array<core::vector2df> positions; |
24 | core::array<u16> indexes; | 24 | core::array<u16> indexes; |
25 | 25 | ||
26 | // for adding one triangle list to another, | 26 | // for adding one triangle list to another, |
27 | // these triangles share positions, but dont share triangles | 27 | // these triangles share positions, but dont share triangles |
28 | STriangleList& operator+=(STriangleList &other) | 28 | STriangleList& operator+=(STriangleList &other) |
29 | { | 29 | { |
30 | core::matrix4 m; | 30 | core::matrix4 m; |
31 | core::array<s32> map; | 31 | core::array<s32> map; |
32 | map.set_used(other.positions.size()); | 32 | map.set_used(other.positions.size()); |
33 | 33 | ||
34 | for (u32 i=0; i<map.size(); ++i) | 34 | for (u32 i=0; i<map.size(); ++i) |
35 | map[i]=-1; | 35 | map[i]=-1; |
36 | 36 | ||
37 | for (u32 i=0; i<positions.size(); ++i) | 37 | for (u32 i=0; i<positions.size(); ++i) |
38 | for (u32 j=0; j<map.size(); ++j) | 38 | for (u32 j=0; j<map.size(); ++j) |
39 | if ( positions[i] == other.positions[j] ) | 39 | if ( positions[i] == other.positions[j] ) |
40 | map[j] = i; | 40 | map[j] = i; |
41 | 41 | ||
42 | for (u32 i=0; i<map.size(); ++i) | 42 | for (u32 i=0; i<map.size(); ++i) |
43 | if (map[i] == -1) | 43 | if (map[i] == -1) |
44 | { | 44 | { |
45 | positions.push_back(other.positions[i]); | 45 | positions.push_back(other.positions[i]); |
46 | map[i] = positions.size()-1; | 46 | map[i] = positions.size()-1; |
47 | } | 47 | } |
48 | 48 | ||
49 | // add triangles | 49 | // add triangles |
50 | for (u32 i=0; i<other.indexes.size(); ++i) | 50 | for (u32 i=0; i<other.indexes.size(); ++i) |
51 | indexes.push_back((u32)map[other.indexes[i]]); | 51 | indexes.push_back((u32)map[other.indexes[i]]); |
52 | 52 | ||
53 | return *this; | 53 | return *this; |
54 | } | 54 | } |
55 | 55 | ||
56 | // functions for building triangles for shapes, | 56 | // functions for building triangles for shapes, |
57 | // each shape can't have duplicate triangles | 57 | // each shape can't have duplicate triangles |
58 | bool hasTriangle(core::vector2df a, core::vector2df b, core::vector2df c) | 58 | bool hasTriangle(core::vector2df a, core::vector2df b, core::vector2df c) |
59 | { | 59 | { |
60 | // make sure the triangle is wound correctly | 60 | // make sure the triangle is wound correctly |
61 | if (core::line2df(a,b).getPointOrientation(c) < 0) | 61 | if (core::line2df(a,b).getPointOrientation(c) < 0) |
62 | { core::vector2df tmp=a; a=b; b=tmp; } | 62 | { core::vector2df tmp=a; a=b; b=tmp; } |
63 | 63 | ||
64 | u32 ia=0xffffffff, ib=0xffffffff, ic=0xffffffff; | 64 | u32 ia=0xffffffff, ib=0xffffffff, ic=0xffffffff; |
65 | // Find each vertex | 65 | // Find each vertex |
66 | for (u32 i=0; i < positions.size() && (ia==(u32)-1||ib==(u32)-1||ic==(u32)-1) ; ++i) | 66 | for (u32 i=0; i < positions.size() && (ia==(u32)-1||ib==(u32)-1||ic==(u32)-1) ; ++i) |
67 | { | 67 | { |
68 | if (positions[i] == a) | 68 | if (positions[i] == a) |
69 | ia = i; | 69 | ia = i; |
70 | if (positions[i] == b) | 70 | if (positions[i] == b) |
71 | ib = i; | 71 | ib = i; |
72 | if (positions[i] == c) | 72 | if (positions[i] == c) |
73 | ic = i; | 73 | ic = i; |
74 | } | 74 | } |
75 | 75 | ||
76 | if (ia==0xffffffff) | 76 | if (ia==0xffffffff) |
77 | { | 77 | { |
78 | return false; | 78 | return false; |
79 | } | 79 | } |
80 | if (ib==0xffffffff) | 80 | if (ib==0xffffffff) |
81 | { | 81 | { |
82 | return false; | 82 | return false; |
83 | } | 83 | } |
84 | if (ic==0xffffffff) | 84 | if (ic==0xffffffff) |
85 | { | 85 | { |
86 | return false; | 86 | return false; |
87 | } | 87 | } |
88 | 88 | ||
89 | for (u32 i=0; i<indexes.size(); i+=3) | 89 | for (u32 i=0; i<indexes.size(); i+=3) |
90 | if ( (indexes[i] == ia && indexes[i+1] == ib && indexes[i+2] == ic) || | 90 | if ( (indexes[i] == ia && indexes[i+1] == ib && indexes[i+2] == ic) || |
91 | (indexes[i] == ic && indexes[i+1] == ia && indexes[i+2] == ib) || | 91 | (indexes[i] == ic && indexes[i+1] == ia && indexes[i+2] == ib) || |
92 | (indexes[i] == ib && indexes[i+1] == ic && indexes[i+2] == ia) ) | 92 | (indexes[i] == ib && indexes[i+1] == ic && indexes[i+2] == ia) ) |
93 | return true; | 93 | return true; |
94 | 94 | ||
95 | return false; | 95 | return false; |
96 | } | 96 | } |
97 | 97 | ||
98 | void add(core::vector2df a, core::vector2df b, core::vector2df c) | 98 | void add(core::vector2df a, core::vector2df b, core::vector2df c) |
99 | { | 99 | { |
100 | 100 | ||
101 | // make sure the triangle is wound correctly | 101 | // make sure the triangle is wound correctly |
102 | if (core::line2df(a,b).getPointOrientation(c) < 0) | 102 | if (core::line2df(a,b).getPointOrientation(c) < 0) |
103 | { | 103 | { |
104 | core::vector2df tmp=a; a=b; b=tmp; | 104 | core::vector2df tmp=a; a=b; b=tmp; |
105 | } | 105 | } |
106 | 106 | ||
107 | u32 ia=0xffffffff, ib=0xffffffff, ic=0xffffffff; | 107 | u32 ia=0xffffffff, ib=0xffffffff, ic=0xffffffff; |
108 | // no duplicate vertex positions allowed... | 108 | // no duplicate vertex positions allowed... |
109 | for (u32 i=0; i < positions.size() && (ia==-1||ib==-1||ic==-1) ; ++i) | 109 | for (u32 i=0; i < positions.size() && (ia==-1||ib==-1||ic==-1) ; ++i) |
110 | { | 110 | { |
111 | if (positions[i] == a) | 111 | if (positions[i] == a) |
112 | ia = i; | 112 | ia = i; |
113 | if (positions[i] == b) | 113 | if (positions[i] == b) |
114 | ib = i; | 114 | ib = i; |
115 | if (positions[i] == c) | 115 | if (positions[i] == c) |
116 | ic = i; | 116 | ic = i; |
117 | } | 117 | } |
118 | bool found=true; | 118 | bool found=true; |
119 | if (ia==0xffffffff) | 119 | if (ia==0xffffffff) |
120 | { | 120 | { |
121 | ia = positions.size(); | 121 | ia = positions.size(); |
122 | positions.push_back(a); | 122 | positions.push_back(a); |
123 | found=false; | 123 | found=false; |
124 | } | 124 | } |
125 | if (ib==0xffffffff) | 125 | if (ib==0xffffffff) |
126 | { | 126 | { |
127 | ib = positions.size(); | 127 | ib = positions.size(); |
128 | positions.push_back(b); | 128 | positions.push_back(b); |
129 | found=false; | 129 | found=false; |
130 | } | 130 | } |
131 | if (ic==0xffffffff) | 131 | if (ic==0xffffffff) |
132 | { | 132 | { |
133 | ic = positions.size(); | 133 | ic = positions.size(); |
134 | positions.push_back(c); | 134 | positions.push_back(c); |
135 | found=false; | 135 | found=false; |
136 | } | 136 | } |
137 | 137 | ||
138 | // no duplicate triangles allowed | 138 | // no duplicate triangles allowed |
139 | if (found) | 139 | if (found) |
140 | { | 140 | { |
141 | found=false; | 141 | found=false; |
142 | for (u32 i=0; i<indexes.size(); i+=3) | 142 | for (u32 i=0; i<indexes.size(); i+=3) |
143 | { | 143 | { |
144 | if ( (indexes[i] == ia && indexes[i+1] == ib && indexes[i+2] == ic) || | 144 | if ( (indexes[i] == ia && indexes[i+1] == ib && indexes[i+2] == ic) || |
145 | (indexes[i] == ic && indexes[i+1] == ia && indexes[i+2] == ib) || | 145 | (indexes[i] == ic && indexes[i+1] == ia && indexes[i+2] == ib) || |
146 | (indexes[i] == ib && indexes[i+1] == ic && indexes[i+2] == ia) ) | 146 | (indexes[i] == ib && indexes[i+1] == ic && indexes[i+2] == ia) ) |
147 | { | 147 | { |
148 | found=true; | 148 | found=true; |
149 | break; | 149 | break; |
150 | } | 150 | } |
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | if (!found) | 154 | if (!found) |
155 | { | 155 | { |
156 | indexes.push_back(ia); | 156 | indexes.push_back(ia); |
157 | indexes.push_back(ib); | 157 | indexes.push_back(ib); |
158 | indexes.push_back(ic); | 158 | indexes.push_back(ic); |
159 | } | 159 | } |
160 | } | 160 | } |
161 | }; | 161 | }; |
162 | 162 | ||
163 | // finds groups of pixels and triangulates them | 163 | // finds groups of pixels and triangulates them |
164 | class CGroupFinder | 164 | class CGroupFinder |
165 | { | 165 | { |
166 | public: | 166 | public: |
167 | CGroupFinder(bool *memory, s32 w, s32 h, IrrlichtDevice *dev): | 167 | CGroupFinder(bool *memory, s32 w, s32 h, IrrlichtDevice *dev): |
168 | width(w), height(h), mem(memory), Device(dev) | 168 | width(w), height(h), mem(memory), Device(dev) |
169 | { | 169 | { |
170 | refbuffer.set_used(w*h); | 170 | refbuffer.set_used(w*h); |
171 | for (u32 i=0; i<refbuffer.size(); ++i) | 171 | for (u32 i=0; i<refbuffer.size(); ++i) |
172 | refbuffer[i]=0; | 172 | refbuffer[i]=0; |
173 | // find groups of pixels | 173 | // find groups of pixels |
174 | findGroups(); | 174 | findGroups(); |
175 | removeGroups(); | 175 | removeGroups(); |
176 | 176 | ||
177 | // triangulate | 177 | // triangulate |
178 | for (u32 i=0; i<groups.size(); ++i) | 178 | for (u32 i=0; i<groups.size(); ++i) |
179 | { | 179 | { |
180 | groups[i].triangulate(); | 180 | groups[i].triangulate(); |
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | // contains a clockwise edge line | 184 | // contains a clockwise edge line |
185 | struct SEdge | 185 | struct SEdge |
186 | { | 186 | { |
187 | SEdge() : positions() { } | 187 | SEdge() : positions() { } |
188 | 188 | ||
189 | core::array<core::position2di> positions; | 189 | core::array<core::position2di> positions; |
190 | 190 | ||
191 | bool isMember(s32 x, s32 y) | 191 | bool isMember(s32 x, s32 y) |
192 | { | 192 | { |
193 | for (u32 i=0; i<positions.size(); ++i) | 193 | for (u32 i=0; i<positions.size(); ++i) |
194 | if (positions[i].X == x && positions[i].Y == y) | 194 | if (positions[i].X == x && positions[i].Y == y) |
195 | return true; | 195 | return true; |
196 | return false; | 196 | return false; |
197 | } | 197 | } |
198 | 198 | ||
199 | // reduces the number of points in the edge | 199 | // reduces the number of points in the edge |
200 | void reduce(s32 level=0) | 200 | void reduce(s32 level=0) |
201 | { | 201 | { |
202 | // level 0- remove points on the same line | 202 | // level 0- remove points on the same line |
203 | for (u32 i=1; i < positions.size()-1; ++i) | 203 | for (u32 i=1; i < positions.size()-1; ++i) |
204 | { | 204 | { |
205 | // same point as the last one?! shouldnt happen, dunno why it does :| | 205 | // same point as the last one?! shouldnt happen, dunno why it does :| |
206 | if (positions[i-1] == positions[i]) | 206 | if (positions[i-1] == positions[i]) |
207 | { | 207 | { |
208 | positions.erase(i--); | 208 | positions.erase(i--); |
209 | continue; | 209 | continue; |
210 | } | 210 | } |
211 | 211 | ||
212 | // get headings | 212 | // get headings |
213 | core::vector2d<f32> h1((f32)(positions[i-1].X - positions[i].X),(f32)(positions[i-1].Y - positions[i].Y)), | 213 | core::vector2d<f32> h1((f32)(positions[i-1].X - positions[i].X),(f32)(positions[i-1].Y - positions[i].Y)), |
214 | h2((f32)(positions[i].X - positions[i+1].X),(f32)(positions[i].Y - positions[i+1].Y)); | 214 | h2((f32)(positions[i].X - positions[i+1].X),(f32)(positions[i].Y - positions[i+1].Y)); |
215 | h1.normalize(); | 215 | h1.normalize(); |
216 | h2.normalize(); | 216 | h2.normalize(); |
217 | 217 | ||
218 | if (h1==h2) // erase the current point | 218 | if (h1==h2) // erase the current point |
219 | positions.erase(i--); | 219 | positions.erase(i--); |
220 | } | 220 | } |
221 | 221 | ||
222 | // level 1- if point1 points at point3, we can skip point2 | 222 | // level 1- if point1 points at point3, we can skip point2 |
223 | // level 2+ allow a deviation of level-1 | 223 | // level 2+ allow a deviation of level-1 |
224 | 224 | ||
225 | } | 225 | } |
226 | 226 | ||
227 | }; | 227 | }; |
228 | 228 | ||
229 | // contains an array of lines for triangulation | 229 | // contains an array of lines for triangulation |
230 | struct SLineList | 230 | struct SLineList |
231 | { | 231 | { |
232 | core::array<core::line2df> lines; | 232 | core::array<core::line2df> lines; |
233 | SLineList() : lines() { } | 233 | SLineList() : lines() { } |
234 | void addEdge(const SEdge &edge) | 234 | void addEdge(const SEdge &edge) |
235 | { | 235 | { |
236 | // adds lines to the buffer | 236 | // adds lines to the buffer |
237 | for (u32 i=1; i<edge.positions.size(); ++i) | 237 | for (u32 i=1; i<edge.positions.size(); ++i) |
238 | addLine(core::line2df((f32)edge.positions[i-1].X, (f32)edge.positions[i-1].Y, | 238 | addLine(core::line2df((f32)edge.positions[i-1].X, (f32)edge.positions[i-1].Y, |
239 | (f32)edge.positions[i].X, (f32)edge.positions[i].Y )); | 239 | (f32)edge.positions[i].X, (f32)edge.positions[i].Y )); |
240 | } | 240 | } |
241 | void addLine( const core::line2df &line ) | 241 | void addLine( const core::line2df &line ) |
242 | { | 242 | { |
243 | // no dupes! | 243 | // no dupes! |
244 | if (!hasLine(line)) | 244 | if (!hasLine(line)) |
245 | lines.push_back(line); | 245 | lines.push_back(line); |
246 | } | 246 | } |
247 | bool hasLine( const core::line2df &line ) | 247 | bool hasLine( const core::line2df &line ) |
248 | { | 248 | { |
249 | for (u32 i=0; i<lines.size(); ++i) | 249 | for (u32 i=0; i<lines.size(); ++i) |
250 | if (line == lines[i] || (line.start == lines[i].end && line.end == lines[i].start) ) | 250 | if (line == lines[i] || (line.start == lines[i].end && line.end == lines[i].start) ) |
251 | return true; | 251 | return true; |
252 | return false; | 252 | return false; |
253 | } | 253 | } |
254 | 254 | ||
255 | bool crossesWith( core::line2df l, core::vector2df p) | 255 | bool crossesWith( core::line2df l, core::vector2df p) |
256 | { | 256 | { |
257 | // inside checks only work with clockwise triangles | 257 | // inside checks only work with clockwise triangles |
258 | if (l.getPointOrientation(p) < 0) | 258 | if (l.getPointOrientation(p) < 0) |
259 | { core::vector2df tmp=l.start; l.start=l.end; l.end=tmp; } | 259 | { core::vector2df tmp=l.start; l.start=l.end; l.end=tmp; } |
260 | 260 | ||
261 | // make the 3 triangle edges | 261 | // make the 3 triangle edges |
262 | core::line2df &la=l, lb(l.end,p), lc(p,l.start); | 262 | core::line2df &la=l, lb(l.end,p), lc(p,l.start); |
263 | 263 | ||
264 | // test every line in the list | 264 | // test every line in the list |
265 | for (u32 i=0; i<lines.size(); ++i) | 265 | for (u32 i=0; i<lines.size(); ++i) |
266 | { | 266 | { |
267 | core::line2df &l2 = lines[i]; | 267 | core::line2df &l2 = lines[i]; |
268 | 268 | ||
269 | // the triangle isn't allowed to enclose any points | 269 | // the triangle isn't allowed to enclose any points |
270 | // triangles are clockwise, so if to the right of all 3 lines, it's enclosed | 270 | // triangles are clockwise, so if to the right of all 3 lines, it's enclosed |
271 | if (la.getPointOrientation(l2.start) > 0 && | 271 | if (la.getPointOrientation(l2.start) > 0 && |
272 | lb.getPointOrientation(l2.start) > 0 && | 272 | lb.getPointOrientation(l2.start) > 0 && |
273 | lc.getPointOrientation(l2.start) > 0) | 273 | lc.getPointOrientation(l2.start) > 0) |
274 | return true; | 274 | return true; |
275 | //if (la.getPointOrientation(l2.start) < 0 && | 275 | //if (la.getPointOrientation(l2.start) < 0 && |
276 | // lb.getPointOrientation(l2.start) < 0 && | 276 | // lb.getPointOrientation(l2.start) < 0 && |
277 | // lc.getPointOrientation(l2.start) < 0) | 277 | // lc.getPointOrientation(l2.start) < 0) |
278 | // return true; | 278 | // return true; |
279 | 279 | ||
280 | core::vector2df out; | 280 | core::vector2df out; |
281 | //if (la.intersectWith(l2,out)) | 281 | //if (la.intersectWith(l2,out)) |
282 | // if (out != la.start && out != la.end && | 282 | // if (out != la.start && out != la.end && |
283 | // out != l2.start && out != l2.end) | 283 | // out != l2.start && out != l2.end) |
284 | // return true; | 284 | // return true; |
285 | if (lb.intersectWith(l2,out)) | 285 | if (lb.intersectWith(l2,out)) |
286 | if (!out.equals(lb.start) && !out.equals(lb.end) && | 286 | if (!out.equals(lb.start) && !out.equals(lb.end) && |
287 | !out.equals(l2.start) && !out.equals(l2.end)) | 287 | !out.equals(l2.start) && !out.equals(l2.end)) |
288 | return true; | 288 | return true; |
289 | if (lc.intersectWith(l2,out)) | 289 | if (lc.intersectWith(l2,out)) |
290 | if (!out.equals(lc.start) && !out.equals(lc.end) && | 290 | if (!out.equals(lc.start) && !out.equals(lc.end) && |
291 | !out.equals(l2.start) && !out.equals(l2.end)) | 291 | !out.equals(l2.start) && !out.equals(l2.end)) |
292 | return true; | 292 | return true; |
293 | 293 | ||
294 | // my shit intersection code only works with lines in certain directions :( | 294 | // my shit intersection code only works with lines in certain directions :( |
295 | if (l2.intersectWith(lb,out)) | 295 | if (l2.intersectWith(lb,out)) |
296 | if (!out.equals(lb.start) && !out.equals(lb.end) && | 296 | if (!out.equals(lb.start) && !out.equals(lb.end) && |
297 | !out.equals(l2.start) && !out.equals(l2.end)) | 297 | !out.equals(l2.start) && !out.equals(l2.end)) |
298 | return true; | 298 | return true; |
299 | if (l2.intersectWith(lc,out)) | 299 | if (l2.intersectWith(lc,out)) |
300 | if (!out.equals(lc.start) && !out.equals(lc.end) && | 300 | if (!out.equals(lc.start) && !out.equals(lc.end) && |
301 | !out.equals(l2.start) && !out.equals(l2.end)) | 301 | !out.equals(l2.start) && !out.equals(l2.end)) |
302 | return true; | 302 | return true; |
303 | 303 | ||
304 | 304 | ||
305 | if (lb.isPointOnLine(l2.start) && l2.start != lb.start && l2.start != lb.end) | 305 | if (lb.isPointOnLine(l2.start) && l2.start != lb.start && l2.start != lb.end) |
306 | return true; | 306 | return true; |
307 | if (lc.isPointOnLine(l2.start) && l2.start != lc.start && l2.start != lc.end) | 307 | if (lc.isPointOnLine(l2.start) && l2.start != lc.start && l2.start != lc.end) |
308 | return true; | 308 | return true; |
309 | 309 | ||
310 | } | 310 | } |
311 | return false; | 311 | return false; |
312 | } | 312 | } |
313 | }; | 313 | }; |
314 | 314 | ||
315 | // an area of adjacent pixels | 315 | // an area of adjacent pixels |
316 | struct SPixelGroup | 316 | struct SPixelGroup |
317 | { | 317 | { |
318 | SPixelGroup(IrrlichtDevice *device) : triangles(), pixelWidth(0), pixelHeight(0), | 318 | SPixelGroup(IrrlichtDevice *device) : triangles(), pixelWidth(0), pixelHeight(0), |
319 | Device(device) {} | 319 | Device(device) {} |
320 | 320 | ||
321 | core::array<core::position2di> pixels; | 321 | core::array<core::position2di> pixels; |
322 | core::array<SEdge> edges; | 322 | core::array<SEdge> edges; |
323 | STriangleList triangles; | 323 | STriangleList triangles; |
324 | core::array<SLineList> ll; | 324 | core::array<SLineList> ll; |
325 | core::array<bool> isMemberCache; | 325 | core::array<bool> isMemberCache; |
326 | s32 pixelWidth; | 326 | s32 pixelWidth; |
327 | s32 pixelHeight; | 327 | s32 pixelHeight; |
328 | IrrlichtDevice *Device; | 328 | IrrlichtDevice *Device; |
329 | 329 | ||
330 | void triangulate() | 330 | void triangulate() |
331 | { | 331 | { |
332 | 332 | ||
333 | // find edges in this group | 333 | // find edges in this group |
334 | makeEdges(); | 334 | makeEdges(); |
335 | 335 | ||
336 | // triangulate the group | 336 | // triangulate the group |
337 | makeTriangles(); | 337 | makeTriangles(); |
338 | 338 | ||
339 | } | 339 | } |
340 | 340 | ||
341 | void drawTriangle( core::line2df line, core::vector2df point) | 341 | void drawTriangle( core::line2df line, core::vector2df point) |
342 | { | 342 | { |
343 | //const u32 endt = Device->getTimer()->getTime() + t; | 343 | //const u32 endt = Device->getTimer()->getTime() + t; |
344 | f32 scale = 5; | 344 | f32 scale = 5; |
345 | 345 | ||
346 | 346 | ||
347 | //while(Device->getTimer()->getTime() < endt ) | 347 | //while(Device->getTimer()->getTime() < endt ) |
348 | //{ | 348 | //{ |
349 | Device->run(); | 349 | Device->run(); |
350 | Device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); | 350 | Device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); |
351 | for (u32 v=0;v<ll.size(); ++v) | 351 | for (u32 v=0;v<ll.size(); ++v) |
352 | for (u32 h=0;h<ll[v].lines.size(); ++h) | 352 | for (u32 h=0;h<ll[v].lines.size(); ++h) |
353 | { | 353 | { |
354 | core::line2df ¤tline = ll[v].lines[h]; | 354 | core::line2df ¤tline = ll[v].lines[h]; |
355 | core::position2di st = core::position2di((s32)(currentline.start.X*scale)+50, (s32)(currentline.start.Y*scale)+50); | 355 | core::position2di st = core::position2di((s32)(currentline.start.X*scale)+50, (s32)(currentline.start.Y*scale)+50); |
356 | core::position2di en = core::position2di((s32)(currentline.end.X*scale)+50, (s32)(currentline.end.Y*scale)+50); | 356 | core::position2di en = core::position2di((s32)(currentline.end.X*scale)+50, (s32)(currentline.end.Y*scale)+50); |
357 | 357 | ||
358 | Device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,255,255)); | 358 | Device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,255,255)); |
359 | } | 359 | } |
360 | // draw this triangle | 360 | // draw this triangle |
361 | const core::position2di st((s32)(line.start.X*scale)+50, (s32)(line.start.Y*scale)+50); | 361 | const core::position2di st((s32)(line.start.X*scale)+50, (s32)(line.start.Y*scale)+50); |
362 | const core::position2di en((s32)(line.end.X*scale)+50, (s32)(line.end.Y*scale)+50); | 362 | const core::position2di en((s32)(line.end.X*scale)+50, (s32)(line.end.Y*scale)+50); |
363 | const core::position2di p((s32)(point.X*scale)+50, (s32)(point.Y*scale)+50); | 363 | const core::position2di p((s32)(point.X*scale)+50, (s32)(point.Y*scale)+50); |
364 | Device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); | 364 | Device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); |
365 | Device->getVideoDriver()->draw2DLine(en,p, SColor(255,0,255,0)); | 365 | Device->getVideoDriver()->draw2DLine(en,p, SColor(255,0,255,0)); |
366 | Device->getVideoDriver()->draw2DLine(p,st, SColor(255,0,0,255)); | 366 | Device->getVideoDriver()->draw2DLine(p,st, SColor(255,0,0,255)); |
367 | 367 | ||
368 | Device->getVideoDriver()->endScene(); | 368 | Device->getVideoDriver()->endScene(); |
369 | //} | 369 | //} |
370 | } | 370 | } |
371 | 371 | ||
372 | void makeTriangles() | 372 | void makeTriangles() |
373 | { | 373 | { |
374 | // make lines from edges, because they're easier to deal with | 374 | // make lines from edges, because they're easier to deal with |
375 | ll.clear(); | 375 | ll.clear(); |
376 | for (u32 i=0; i < edges.size(); ++i) | 376 | for (u32 i=0; i < edges.size(); ++i) |
377 | { | 377 | { |
378 | SLineList l; | 378 | SLineList l; |
379 | l.addEdge(edges[i]); | 379 | l.addEdge(edges[i]); |
380 | ll.push_back(l); | 380 | ll.push_back(l); |
381 | } | 381 | } |
382 | // add an extra one for inside edges | 382 | // add an extra one for inside edges |
383 | SLineList innerlines; | 383 | SLineList innerlines; |
384 | ll.push_back(innerlines); | 384 | ll.push_back(innerlines); |
385 | 385 | ||
386 | // loop through each edge and make triangles | 386 | // loop through each edge and make triangles |
387 | for (u32 i=0; i<ll.size(); ++i) | 387 | for (u32 i=0; i<ll.size(); ++i) |
388 | { | 388 | { |
389 | // loop through each line in the edge | 389 | // loop through each line in the edge |
390 | for (u32 cl=0; cl<ll[i].lines.size(); ++cl) | 390 | for (u32 cl=0; cl<ll[i].lines.size(); ++cl) |
391 | { | 391 | { |
392 | 392 | ||
393 | core::line2df ¤tLine = ll[i].lines[cl]; | 393 | core::line2df ¤tLine = ll[i].lines[cl]; |
394 | f32 bestScore = -10.0f; | 394 | f32 bestScore = -10.0f; |
395 | s32 bestEdge = -1; | 395 | s32 bestEdge = -1; |
396 | s32 bestPoint = -1; | 396 | s32 bestPoint = -1; |
397 | // find the best scoring point to join to this line | 397 | // find the best scoring point to join to this line |
398 | for (u32 k=0; k<ll.size(); ++k) | 398 | for (u32 k=0; k<ll.size(); ++k) |
399 | for (u32 j=0; j< ll[k].lines.size(); ++j) | 399 | for (u32 j=0; j< ll[k].lines.size(); ++j) |
400 | { | 400 | { |
401 | f32 score = 0.0f; | 401 | f32 score = 0.0f; |
402 | core::vector2df point(ll[k].lines[j].start.X, | 402 | core::vector2df point(ll[k].lines[j].start.X, |
403 | ll[k].lines[j].start.Y); | 403 | ll[k].lines[j].start.Y); |
404 | core::line2df line1(point,currentLine.start); | 404 | core::line2df line1(point,currentLine.start); |
405 | core::line2df line2(currentLine.end,point); | 405 | core::line2df line2(currentLine.end,point); |
406 | 406 | ||
407 | // can't be part of the current line | 407 | // can't be part of the current line |
408 | if (point == currentLine.start || point == currentLine.end) | 408 | if (point == currentLine.start || point == currentLine.end) |
409 | continue; | 409 | continue; |
410 | 410 | ||
411 | // must be to the right hand side (triangles are wound clockwise) | 411 | // must be to the right hand side (triangles are wound clockwise) |
412 | // unless its part of the inside... | 412 | // unless its part of the inside... |
413 | f32 side1 = currentLine.getPointOrientation(point); | 413 | f32 side1 = currentLine.getPointOrientation(point); |
414 | f32 side2 = core::line2df(point,currentLine.start).getPointOrientation(currentLine.end); | 414 | f32 side2 = core::line2df(point,currentLine.start).getPointOrientation(currentLine.end); |
415 | f32 side3 = core::line2df(currentLine.end,point).getPointOrientation(currentLine.start); | 415 | f32 side3 = core::line2df(currentLine.end,point).getPointOrientation(currentLine.start); |
416 | if (i<ll.size()-1) | 416 | if (i<ll.size()-1) |
417 | if (side1 <= 0 || side2 <= 0 || side3 <=0) | 417 | if (side1 <= 0 || side2 <= 0 || side3 <=0) |
418 | continue; | 418 | continue; |
419 | 419 | ||
420 | // can't already have this triangle | 420 | // can't already have this triangle |
421 | if (triangles.hasTriangle(currentLine.start,currentLine.end,point)) | 421 | if (triangles.hasTriangle(currentLine.start,currentLine.end,point)) |
422 | continue; | 422 | continue; |
423 | 423 | ||
424 | // must not cross any other lines or enclose any points | 424 | // must not cross any other lines or enclose any points |
425 | bool itCrossed = false; | 425 | bool itCrossed = false; |
426 | for (u32 v=0; v<ll.size(); ++v) | 426 | for (u32 v=0; v<ll.size(); ++v) |
427 | if (ll[v].crossesWith(currentLine, point)) | 427 | if (ll[v].crossesWith(currentLine, point)) |
428 | { | 428 | { |
429 | itCrossed = true; | 429 | itCrossed = true; |
430 | break; | 430 | break; |
431 | } | 431 | } |
432 | if (itCrossed) | 432 | if (itCrossed) |
433 | continue; | 433 | continue; |
434 | 434 | ||
435 | 435 | ||
436 | // so, we like this triangle, but how much? | 436 | // so, we like this triangle, but how much? |
437 | // is it better than all the others? | 437 | // is it better than all the others? |
438 | 438 | ||
439 | // we prefer points from other edges, unless its on the inside | 439 | // we prefer points from other edges, unless its on the inside |
440 | if (k==i && i != ll.size()-1) | 440 | if (k==i && i != ll.size()-1) |
441 | score = 1; | 441 | score = 1; |
442 | else | 442 | else |
443 | score = 2; | 443 | score = 2; |
444 | 444 | ||
445 | // we prefer evenly shaped triangles | 445 | // we prefer evenly shaped triangles |
446 | 446 | ||
447 | // we prefer triangles with a large area | 447 | // we prefer triangles with a large area |
448 | 448 | ||
449 | // do we like this one more than the others? | 449 | // do we like this one more than the others? |
450 | if (score>bestScore) | 450 | if (score>bestScore) |
451 | { | 451 | { |
452 | bestScore = score; | 452 | bestScore = score; |
453 | bestEdge = k; | 453 | bestEdge = k; |
454 | bestPoint = j; | 454 | bestPoint = j; |
455 | } | 455 | } |
456 | } | 456 | } |
457 | // hopefully we found one | 457 | // hopefully we found one |
458 | if (bestEdge >= 0 && bestPoint >= 0 && bestScore >= 0.0f) | 458 | if (bestEdge >= 0 && bestPoint >= 0 && bestScore >= 0.0f) |
459 | { | 459 | { |
460 | //assert(bestEdge >= 0 && bestPoint >= 0); | 460 | //assert(bestEdge >= 0 && bestPoint >= 0); |
461 | //assert(bestScore >= 0.0f); | 461 | //assert(bestScore >= 0.0f); |
462 | 462 | ||
463 | core::vector2df point(ll[bestEdge].lines[bestPoint].start.X, ll[bestEdge].lines[bestPoint].start.Y); | 463 | core::vector2df point(ll[bestEdge].lines[bestPoint].start.X, ll[bestEdge].lines[bestPoint].start.Y); |
464 | 464 | ||
465 | // add it to the triangles list | 465 | // add it to the triangles list |
466 | triangles.add(currentLine.start, currentLine.end, point); | 466 | triangles.add(currentLine.start, currentLine.end, point); |
467 | 467 | ||
468 | // add inner lines to the line buffer, but only if they arent in others | 468 | // add inner lines to the line buffer, but only if they arent in others |
469 | 469 | ||
470 | core::line2df la(point,currentLine.start); | 470 | core::line2df la(point,currentLine.start); |
471 | core::line2df lb(currentLine.end,point); | 471 | core::line2df lb(currentLine.end,point); |
472 | 472 | ||
473 | bool found = false; | 473 | bool found = false; |
474 | for (u32 lineno=0;lineno<ll.size()-1; ++lineno) | 474 | for (u32 lineno=0;lineno<ll.size()-1; ++lineno) |
475 | if (ll[lineno].hasLine(la)) | 475 | if (ll[lineno].hasLine(la)) |
476 | { found=true; break; } | 476 | { found=true; break; } |
477 | if (!found) | 477 | if (!found) |
478 | ll[ll.size()-1].addLine(la); | 478 | ll[ll.size()-1].addLine(la); |
479 | 479 | ||
480 | for (u32 lineno=0;lineno<ll.size()-1; ++lineno) | 480 | for (u32 lineno=0;lineno<ll.size()-1; ++lineno) |
481 | if (ll[lineno].hasLine(lb)) | 481 | if (ll[lineno].hasLine(lb)) |
482 | { found=true; break; } | 482 | { found=true; break; } |
483 | if (!found) | 483 | if (!found) |
484 | ll[ll.size()-1].addLine(lb); | 484 | ll[ll.size()-1].addLine(lb); |
485 | 485 | ||
486 | //drawTriangle(currentLine, point); | 486 | //drawTriangle(currentLine, point); |
487 | 487 | ||
488 | } | 488 | } |
489 | 489 | ||
490 | } | 490 | } |
491 | } | 491 | } |
492 | } | 492 | } |
493 | 493 | ||
494 | // finds the edges | 494 | // finds the edges |
495 | void makeEdges() | 495 | void makeEdges() |
496 | { | 496 | { |
497 | 497 | ||
498 | // speed it up | 498 | // speed it up |
499 | refreshIsMemberCache(); | 499 | refreshIsMemberCache(); |
500 | 500 | ||
501 | // clear the edges | 501 | // clear the edges |
502 | edges.clear(); | 502 | edges.clear(); |
503 | 503 | ||
504 | // loop through each pixel | 504 | // loop through each pixel |
505 | for (u32 i=0; i < pixels.size(); ++i) | 505 | for (u32 i=0; i < pixels.size(); ++i) |
506 | { | 506 | { |
507 | core::position2di &p = pixels[i]; | 507 | core::position2di &p = pixels[i]; |
508 | s32 &x=p.X, &y=p.Y; | 508 | s32 &x=p.X, &y=p.Y; |
509 | bool ul = isMember(p.X-1,p.Y-1); | 509 | bool ul = isMember(p.X-1,p.Y-1); |
510 | bool u = isMember(p.X,p.Y-1); | 510 | bool u = isMember(p.X,p.Y-1); |
511 | bool ur = isMember(p.X+1,p.Y-1); | 511 | bool ur = isMember(p.X+1,p.Y-1); |
512 | bool l = isMember(p.X-1,p.Y); | 512 | bool l = isMember(p.X-1,p.Y); |
513 | bool r = isMember(p.X+1,p.Y); | 513 | bool r = isMember(p.X+1,p.Y); |
514 | bool bl = isMember(p.X-1,p.Y+1); | 514 | bool bl = isMember(p.X-1,p.Y+1); |
515 | bool b = isMember(p.X,p.Y+1); | 515 | bool b = isMember(p.X,p.Y+1); |
516 | bool br = isMember(p.X+1,p.Y+1); | 516 | bool br = isMember(p.X+1,p.Y+1); |
517 | 517 | ||
518 | // walls already added? | 518 | // walls already added? |
519 | bool top=u, bottom=b, left=l, right=r; | 519 | bool top=u, bottom=b, left=l, right=r; |
520 | 520 | ||
521 | if (!(ul | u | ur | l | r | bl | b | br)) | 521 | if (!(ul | u | ur | l | r | bl | b | br)) |
522 | { | 522 | { |
523 | // lone square | 523 | // lone square |
524 | SEdge a; | 524 | SEdge a; |
525 | a.positions.push_back( core::position2di(x,y)); | 525 | a.positions.push_back( core::position2di(x,y)); |
526 | a.positions.push_back( core::position2di(x+1,y)); | 526 | a.positions.push_back( core::position2di(x+1,y)); |
527 | a.positions.push_back( core::position2di(x+1,y+1)); | 527 | a.positions.push_back( core::position2di(x+1,y+1)); |
528 | a.positions.push_back( core::position2di(x,y+1)); | 528 | a.positions.push_back( core::position2di(x,y+1)); |
529 | a.positions.push_back( core::position2di(x,y)); | 529 | a.positions.push_back( core::position2di(x,y)); |
530 | edges.push_back(a); | 530 | edges.push_back(a); |
531 | top=bottom=left=right=true; | 531 | top=bottom=left=right=true; |
532 | } | 532 | } |
533 | else | 533 | else |
534 | { | 534 | { |
535 | if (!(ul|u|l) && (b&r) ) | 535 | if (!(ul|u|l) && (b&r) ) |
536 | { | 536 | { |
537 | // upper outer diagonal "/" | 537 | // upper outer diagonal "/" |
538 | addToEdges(x,y+1,x+1,y); | 538 | addToEdges(x,y+1,x+1,y); |
539 | top=left=true; | 539 | top=left=true; |
540 | } else if ( !(u|ur|r) && (b&l) ) | 540 | } else if ( !(u|ur|r) && (b&l) ) |
541 | { | 541 | { |
542 | // upper outer diagonal "\" | 542 | // upper outer diagonal "\" |
543 | addToEdges(x,y,x+1,y+1); | 543 | addToEdges(x,y,x+1,y+1); |
544 | top=right=true; | 544 | top=right=true; |
545 | } else if ( !(l|bl|b) && (r&u) ) | 545 | } else if ( !(l|bl|b) && (r&u) ) |
546 | { | 546 | { |
547 | // lower outer diagonal "\" | 547 | // lower outer diagonal "\" |
548 | addToEdges(x+1,y+1,x,y); | 548 | addToEdges(x+1,y+1,x,y); |
549 | left=bottom=true; | 549 | left=bottom=true; |
550 | } else if ( !(r|br|b) && (l&u) ) | 550 | } else if ( !(r|br|b) && (l&u) ) |
551 | { | 551 | { |
552 | // lower outer diagonal "/" | 552 | // lower outer diagonal "/" |
553 | addToEdges(x+1,y,x,y+1); | 553 | addToEdges(x+1,y,x,y+1); |
554 | right=bottom=true; | 554 | right=bottom=true; |
555 | }/* else if (!(b) && (l&bl) ) | 555 | }/* else if (!(b) && (l&bl) ) |
556 | { | 556 | { |
557 | // upper inner diagonal "/" | 557 | // upper inner diagonal "/" |
558 | addToEdges(x+1,y+1,x,y+2); | 558 | addToEdges(x+1,y+1,x,y+2); |
559 | //bottom=true; | 559 | //bottom=true; |
560 | } else if ( !(b) && (r&br) ) | 560 | } else if ( !(b) && (r&br) ) |
561 | { | 561 | { |
562 | // upper inner diagonal "\" | 562 | // upper inner diagonal "\" |
563 | addToEdges(x+1,y+2,x,y+1); | 563 | addToEdges(x+1,y+2,x,y+1); |
564 | //bottom=true; | 564 | //bottom=true; |
565 | } else if ( !(r) && (b&br) ) | 565 | } else if ( !(r) && (b&br) ) |
566 | { | 566 | { |
567 | // lower inner diagonal "\" | 567 | // lower inner diagonal "\" |
568 | addToEdges(x+1,y,x+2,y+1); | 568 | addToEdges(x+1,y,x+2,y+1); |
569 | //right=true; | 569 | //right=true; |
570 | } else if ( !(l) && (b&bl) ) | 570 | } else if ( !(l) && (b&bl) ) |
571 | { | 571 | { |
572 | // lower inner diagonal "/" | 572 | // lower inner diagonal "/" |
573 | addToEdges(x-1,y+1,x,y); | 573 | addToEdges(x-1,y+1,x,y); |
574 | //left=true; | 574 | //left=true; |
575 | }*/ | 575 | }*/ |
576 | 576 | ||
577 | // add flat edges | 577 | // add flat edges |
578 | if (!left /*&& !( (u&ul) || (b&bl)) */) addToEdges(x,y+1,x,y); | 578 | if (!left /*&& !( (u&ul) || (b&bl)) */) addToEdges(x,y+1,x,y); |
579 | if (!top /*&& !( (l&ul) || (r&ur)) */) addToEdges(x,y,x+1,y); | 579 | if (!top /*&& !( (l&ul) || (r&ur)) */) addToEdges(x,y,x+1,y); |
580 | if (!right /*&& !( (u&ur) || (b&br)) */) addToEdges(x+1,y,x+1,y+1); | 580 | if (!right /*&& !( (u&ur) || (b&br)) */) addToEdges(x+1,y,x+1,y+1); |
581 | if (!bottom /*&& !( (l&bl) || (r&br)) */) addToEdges(x+1,y+1,x,y+1); | 581 | if (!bottom /*&& !( (l&bl) || (r&br)) */) addToEdges(x+1,y+1,x,y+1); |
582 | } // lone square | 582 | } // lone square |
583 | } // for | 583 | } // for |
584 | 584 | ||
585 | // reduce the number of points in each edge | 585 | // reduce the number of points in each edge |
586 | for (u32 i=0; i<edges.size(); ++i) | 586 | for (u32 i=0; i<edges.size(); ++i) |
587 | { | 587 | { |
588 | edges[i].reduce(1); | 588 | edges[i].reduce(1); |
589 | 589 | ||
590 | // all edges should have at least 3 points | 590 | // all edges should have at least 3 points |
591 | assert(edges[i].positions.size() >= 3); | 591 | assert(edges[i].positions.size() >= 3); |
592 | 592 | ||
593 | // all edges should be closed | 593 | // all edges should be closed |
594 | assert(edges[i].positions[0] == edges[i].positions[edges[i].positions.size()-1] ); | 594 | assert(edges[i].positions[0] == edges[i].positions[edges[i].positions.size()-1] ); |
595 | } | 595 | } |
596 | } | 596 | } |
597 | 597 | ||
598 | // adds a line to the edges arrays | 598 | // adds a line to the edges arrays |
599 | void addToEdges(s32 x1, s32 y1, s32 x2, s32 y2) | 599 | void addToEdges(s32 x1, s32 y1, s32 x2, s32 y2) |
600 | { | 600 | { |
601 | bool found=false; | 601 | bool found=false; |
602 | // loop through each edge | 602 | // loop through each edge |
603 | for (u32 i=0; i<edges.size(); ++i) | 603 | for (u32 i=0; i<edges.size(); ++i) |
604 | { | 604 | { |
605 | // if this line starts at the end of an edge | 605 | // if this line starts at the end of an edge |
606 | if ( edges[i].positions[edges[i].positions.size()-1] == core::position2di(x1,y1)) | 606 | if ( edges[i].positions[edges[i].positions.size()-1] == core::position2di(x1,y1)) |
607 | { | 607 | { |
608 | // add it to the end | 608 | // add it to the end |
609 | edges[i].positions.push_back(core::position2di(x2,y2)); | 609 | edges[i].positions.push_back(core::position2di(x2,y2)); |
610 | found=true; | 610 | found=true; |
611 | break; | 611 | break; |
612 | } | 612 | } |
613 | // if the line ends at the start of the edge | 613 | // if the line ends at the start of the edge |
614 | if ( edges[i].positions[0]== core::position2di(x2,y2)) | 614 | if ( edges[i].positions[0]== core::position2di(x2,y2)) |
615 | { | 615 | { |
616 | // add it to the front | 616 | // add it to the front |
617 | edges[i].positions.push_front(core::position2di(x1,y1)); | 617 | edges[i].positions.push_front(core::position2di(x1,y1)); |
618 | found=true; | 618 | found=true; |
619 | break; | 619 | break; |
620 | } | 620 | } |
621 | } | 621 | } |
622 | if (!found) | 622 | if (!found) |
623 | { | 623 | { |
624 | // we make a new edge | 624 | // we make a new edge |
625 | SEdge n; | 625 | SEdge n; |
626 | n.positions.push_back(core::position2di(x1,y1)); | 626 | n.positions.push_back(core::position2di(x1,y1)); |
627 | n.positions.push_back(core::position2di(x2,y2)); | 627 | n.positions.push_back(core::position2di(x2,y2)); |
628 | edges.push_back(n); | 628 | edges.push_back(n); |
629 | } | 629 | } |
630 | 630 | ||
631 | joinEdges(); | 631 | joinEdges(); |
632 | } | 632 | } |
633 | 633 | ||
634 | void joinEdges() | 634 | void joinEdges() |
635 | { | 635 | { |
636 | // touching edges are joined | 636 | // touching edges are joined |
637 | 637 | ||
638 | for (u32 i=0; i < edges.size(); ++i) | 638 | for (u32 i=0; i < edges.size(); ++i) |
639 | for (u32 j=0; j < edges.size(); ++j) | 639 | for (u32 j=0; j < edges.size(); ++j) |
640 | { | 640 | { |
641 | if (i != j && edges[j].positions.size() && edges[i].positions.size()) | 641 | if (i != j && edges[j].positions.size() && edges[i].positions.size()) |
642 | { | 642 | { |
643 | if (edges[j].positions[0] == edges[i].positions[edges[i].positions.size()-1]) | 643 | if (edges[j].positions[0] == edges[i].positions[edges[i].positions.size()-1]) |
644 | { | 644 | { |
645 | for (u32 k=0; k < edges[j].positions.size(); ++k) | 645 | for (u32 k=0; k < edges[j].positions.size(); ++k) |
646 | edges[i].positions.push_back(edges[j].positions[k]); | 646 | edges[i].positions.push_back(edges[j].positions[k]); |
647 | edges[j].positions.clear(); | 647 | edges[j].positions.clear(); |
648 | } | 648 | } |
649 | } | 649 | } |
650 | } | 650 | } |
651 | 651 | ||
652 | // remove empty edges | 652 | // remove empty edges |
653 | for (u32 i=0; i<edges.size(); ++i) | 653 | for (u32 i=0; i<edges.size(); ++i) |
654 | if (edges[i].positions.size() == 0) | 654 | if (edges[i].positions.size() == 0) |
655 | edges.erase(i--); | 655 | edges.erase(i--); |
656 | } | 656 | } |
657 | 657 | ||
658 | // tells if this x,y position is a member of this group | 658 | // tells if this x,y position is a member of this group |
659 | bool isMember(s32 x, s32 y) | 659 | bool isMember(s32 x, s32 y) |
660 | { | 660 | { |
661 | //for (u32 i=0; i<pixels.size(); ++i) | 661 | //for (u32 i=0; i<pixels.size(); ++i) |
662 | // if (pixels[i].X == x && pixels[i].Y == y) | 662 | // if (pixels[i].X == x && pixels[i].Y == y) |
663 | // return true; | 663 | // return true; |
664 | if (x>pixelWidth || y>pixelHeight || x<0 || y<0) | 664 | if (x>pixelWidth || y>pixelHeight || x<0 || y<0) |
665 | return false; | 665 | return false; |
666 | else | 666 | else |
667 | return isMemberCache[pixelWidth*y + x]; | 667 | return isMemberCache[pixelWidth*y + x]; |
668 | } | 668 | } |
669 | 669 | ||
670 | void refreshIsMemberCache() | 670 | void refreshIsMemberCache() |
671 | { | 671 | { |
672 | isMemberCache.clear(); | 672 | isMemberCache.clear(); |
673 | pixelWidth=0; pixelHeight=0; | 673 | pixelWidth=0; pixelHeight=0; |
674 | for (u32 i=0; i<pixels.size(); ++i) | 674 | for (u32 i=0; i<pixels.size(); ++i) |
675 | { | 675 | { |
676 | if (pixels[i].X>pixelWidth) pixelWidth=pixels[i].X; | 676 | if (pixels[i].X>pixelWidth) pixelWidth=pixels[i].X; |
677 | if (pixels[i].Y>pixelHeight) pixelHeight=pixels[i].Y; | 677 | if (pixels[i].Y>pixelHeight) pixelHeight=pixels[i].Y; |
678 | } | 678 | } |
679 | pixelWidth+=2; pixelHeight+=2; | 679 | pixelWidth+=2; pixelHeight+=2; |
680 | isMemberCache.set_used(pixelWidth*pixelHeight+1); | 680 | isMemberCache.set_used(pixelWidth*pixelHeight+1); |
681 | for (u32 i=0; i<isMemberCache.size(); ++i) | 681 | for (u32 i=0; i<isMemberCache.size(); ++i) |
682 | isMemberCache[i] = false; | 682 | isMemberCache[i] = false; |
683 | for (u32 i=0; i<pixels.size(); ++i) | 683 | for (u32 i=0; i<pixels.size(); ++i) |
684 | isMemberCache[pixelWidth*pixels[i].Y + pixels[i].X] = true; | 684 | isMemberCache[pixelWidth*pixels[i].Y + pixels[i].X] = true; |
685 | } | 685 | } |
686 | }; | 686 | }; |
687 | 687 | ||
688 | 688 | ||
689 | void drawEdges(IrrlichtDevice *device, u32 t, s32 scale) | 689 | void drawEdges(IrrlichtDevice *device, u32 t, s32 scale) |
690 | { | 690 | { |
691 | const u32 stt = device->getTimer()->getTime(); | 691 | const u32 stt = device->getTimer()->getTime(); |
692 | const u32 endt = stt + t; | 692 | const u32 endt = stt + t; |
693 | 693 | ||
694 | while(device->getTimer()->getTime() < endt ) | 694 | while(device->getTimer()->getTime() < endt ) |
695 | { | 695 | { |
696 | const f32 phase = f32((device->getTimer()->getTime()-stt) % 500) / 500.0f; | 696 | const f32 phase = f32((device->getTimer()->getTime()-stt) % 500) / 500.0f; |
697 | 697 | ||
698 | device->run(); | 698 | device->run(); |
699 | device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); | 699 | device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); |
700 | for (u32 g=0;g<groups.size(); ++g) | 700 | for (u32 g=0;g<groups.size(); ++g) |
701 | for (u32 v=0;v<groups[g].edges.size(); ++v) | 701 | for (u32 v=0;v<groups[g].edges.size(); ++v) |
702 | for (u32 p=1;p<groups[g].edges[v].positions.size(); ++p) | 702 | for (u32 p=1;p<groups[g].edges[v].positions.size(); ++p) |
703 | { | 703 | { |
704 | core::position2di st = core::position2di(groups[g].edges[v].positions[p-1].X*scale+50, groups[g].edges[v].positions[p-1].Y*scale+50) ; | 704 | core::position2di st = core::position2di(groups[g].edges[v].positions[p-1].X*scale+50, groups[g].edges[v].positions[p-1].Y*scale+50) ; |
705 | core::position2di en = core::position2di(groups[g].edges[v].positions[p].X*scale+50, groups[g].edges[v].positions[p].Y*scale+50) ; | 705 | core::position2di en = core::position2di(groups[g].edges[v].positions[p].X*scale+50, groups[g].edges[v].positions[p].Y*scale+50) ; |
706 | core::position2di ep = en-st; | 706 | core::position2di ep = en-st; |
707 | ep = st + core::position2di((s32)(ep.X*phase), (s32)(ep.Y*phase)); | 707 | ep = st + core::position2di((s32)(ep.X*phase), (s32)(ep.Y*phase)); |
708 | device->getVideoDriver()->draw2DLine(st,en); | 708 | device->getVideoDriver()->draw2DLine(st,en); |
709 | device->getVideoDriver()->draw2DLine(st,ep,video::SColor(255,255,0,0) ); | 709 | device->getVideoDriver()->draw2DLine(st,ep,video::SColor(255,255,0,0) ); |
710 | } | 710 | } |
711 | device->getVideoDriver()->endScene(); | 711 | device->getVideoDriver()->endScene(); |
712 | } | 712 | } |
713 | } | 713 | } |
714 | 714 | ||
715 | void drawTriangles(IrrlichtDevice *device, u32 t, s32 scale) | 715 | void drawTriangles(IrrlichtDevice *device, u32 t, s32 scale) |
716 | { | 716 | { |
717 | const u32 stt = device->getTimer()->getTime(); | 717 | const u32 stt = device->getTimer()->getTime(); |
718 | const u32 endt = stt + t; | 718 | const u32 endt = stt + t; |
719 | 719 | ||
720 | while(device->getTimer()->getTime() < endt ) | 720 | while(device->getTimer()->getTime() < endt ) |
721 | { | 721 | { |
722 | const f32 phase = f32((device->getTimer()->getTime()-stt) % 500) / 500.0f; | 722 | const f32 phase = f32((device->getTimer()->getTime()-stt) % 500) / 500.0f; |
723 | 723 | ||
724 | device->run(); | 724 | device->run(); |
725 | device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); | 725 | device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); |
726 | for (u32 g=0;g<groups.size(); ++g) | 726 | for (u32 g=0;g<groups.size(); ++g) |
727 | for (u32 v=0;v<groups[g].triangles.indexes.size()*phase; v+=3) | 727 | for (u32 v=0;v<groups[g].triangles.indexes.size()*phase; v+=3) |
728 | { | 728 | { |
729 | STriangleList &t = groups[g].triangles; | 729 | STriangleList &t = groups[g].triangles; |
730 | core::position2di st((s32)(t.positions[t.indexes[v+0]].X*scale)+50,(s32)(t.positions[t.indexes[v+0]].Y*scale)+50); | 730 | core::position2di st((s32)(t.positions[t.indexes[v+0]].X*scale)+50,(s32)(t.positions[t.indexes[v+0]].Y*scale)+50); |
731 | core::position2di en((s32)(t.positions[t.indexes[v+1]].X*scale)+50,(s32)(t.positions[t.indexes[v+1]].Y*scale)+50); | 731 | core::position2di en((s32)(t.positions[t.indexes[v+1]].X*scale)+50,(s32)(t.positions[t.indexes[v+1]].Y*scale)+50); |
732 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); | 732 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); |
733 | st = core::position2di((s32)(t.positions[t.indexes[v+1]].X*scale)+50,(s32)(t.positions[t.indexes[v+1]].Y*scale)+50); | 733 | st = core::position2di((s32)(t.positions[t.indexes[v+1]].X*scale)+50,(s32)(t.positions[t.indexes[v+1]].Y*scale)+50); |
734 | en = core::position2di((s32)(t.positions[t.indexes[v+2]].X*scale)+50,(s32)(t.positions[t.indexes[v+2]].Y*scale)+50); | 734 | en = core::position2di((s32)(t.positions[t.indexes[v+2]].X*scale)+50,(s32)(t.positions[t.indexes[v+2]].Y*scale)+50); |
735 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,0,255,0)); | 735 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,0,255,0)); |
736 | st = core::position2di((s32)(t.positions[t.indexes[v+2]].X*scale)+50,(s32)(t.positions[t.indexes[v+2]].Y*scale)+50); | 736 | st = core::position2di((s32)(t.positions[t.indexes[v+2]].X*scale)+50,(s32)(t.positions[t.indexes[v+2]].Y*scale)+50); |
737 | en = core::position2di((s32)(t.positions[t.indexes[v+0]].X*scale)+50,(s32)(t.positions[t.indexes[v+0]].Y*scale)+50); | 737 | en = core::position2di((s32)(t.positions[t.indexes[v+0]].X*scale)+50,(s32)(t.positions[t.indexes[v+0]].Y*scale)+50); |
738 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,0,0,255)); | 738 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,0,0,255)); |
739 | } | 739 | } |
740 | device->getVideoDriver()->endScene(); | 740 | device->getVideoDriver()->endScene(); |
741 | } | 741 | } |
742 | } | 742 | } |
743 | 743 | ||
744 | void drawTriLines(IrrlichtDevice *device, u32 t, s32 scale) | 744 | void drawTriLines(IrrlichtDevice *device, u32 t, s32 scale) |
745 | { | 745 | { |
746 | const u32 endt = device->getTimer()->getTime() + t; | 746 | const u32 endt = device->getTimer()->getTime() + t; |
747 | 747 | ||
748 | while(device->getTimer()->getTime() < endt ) | 748 | while(device->getTimer()->getTime() < endt ) |
749 | { | 749 | { |
750 | device->run(); | 750 | device->run(); |
751 | device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); | 751 | device->getVideoDriver()->beginScene(true,true,video::SColor(0,0,0,0)); |
752 | for (u32 g=0;g<groups.size(); ++g) | 752 | for (u32 g=0;g<groups.size(); ++g) |
753 | for (u32 v=0;v<groups[g].ll.size()-1; ++v) | 753 | for (u32 v=0;v<groups[g].ll.size()-1; ++v) |
754 | for (u32 h=0;h<groups[g].ll[v].lines.size(); ++h) | 754 | for (u32 h=0;h<groups[g].ll[v].lines.size(); ++h) |
755 | { | 755 | { |
756 | core::line2df ¤tline = groups[g].ll[v].lines[h]; | 756 | core::line2df ¤tline = groups[g].ll[v].lines[h]; |
757 | const core::position2di st((s32)(currentline.start.X*scale)+50, (s32)(currentline.start.Y*scale)+50); | 757 | const core::position2di st((s32)(currentline.start.X*scale)+50, (s32)(currentline.start.Y*scale)+50); |
758 | const core::position2di en((s32)(currentline.end.X*scale)+50, (s32)(currentline.end.Y*scale)+50); | 758 | const core::position2di en((s32)(currentline.end.X*scale)+50, (s32)(currentline.end.Y*scale)+50); |
759 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); | 759 | device->getVideoDriver()->draw2DLine(st,en, SColor(255,255,0,0)); |
760 | } | 760 | } |
761 | 761 | ||
762 | device->getVideoDriver()->endScene(); | 762 | device->getVideoDriver()->endScene(); |
763 | } | 763 | } |
764 | } | 764 | } |
765 | void drawTri3D(IrrlichtDevice *device, u32 t) | 765 | void drawTri3D(IrrlichtDevice *device, u32 t) |
766 | { | 766 | { |
767 | for (u32 g=0;g<groups.size(); ++g) | 767 | for (u32 g=0;g<groups.size(); ++g) |
768 | { | 768 | { |
769 | STriangleList &t = groups[g].triangles; | 769 | STriangleList &t = groups[g].triangles; |
770 | core::array<S3DVertex> verts; | 770 | core::array<S3DVertex> verts; |
771 | verts.clear(); | 771 | verts.clear(); |
772 | for(u32 v=0; v< t.positions.size(); ++v) | 772 | for(u32 v=0; v< t.positions.size(); ++v) |
773 | { | 773 | { |
774 | verts.push_back(S3DVertex( | 774 | verts.push_back(S3DVertex( |
775 | -t.positions[v].X, -t.positions[v].Y, -100, | 775 | -t.positions[v].X, -t.positions[v].Y, -100, |
776 | 0,0,1,SColor(255,255,255,255),0,0)); | 776 | 0,0,1,SColor(255,255,255,255),0,0)); |
777 | } | 777 | } |
778 | 778 | ||
779 | device->getVideoDriver()->drawIndexedTriangleList(verts.pointer(),verts.size(),t.indexes.pointer(), t.indexes.size()/3 ); | 779 | device->getVideoDriver()->drawIndexedTriangleList(verts.pointer(),verts.size(),t.indexes.pointer(), t.indexes.size()/3 ); |
780 | } | 780 | } |
781 | } | 781 | } |
782 | 782 | ||
783 | 783 | ||
784 | // process all pixels | 784 | // process all pixels |
785 | void findGroups() | 785 | void findGroups() |
786 | { | 786 | { |
787 | for (int y=0; y<height; ++y) | 787 | for (int y=0; y<height; ++y) |
788 | for (int x=0; x<width; ++x) | 788 | for (int x=0; x<width; ++x) |
789 | processPixel(x,y); | 789 | processPixel(x,y); |
790 | 790 | ||
791 | } | 791 | } |
792 | 792 | ||
793 | // remove groups with no pixels | 793 | // remove groups with no pixels |
794 | void removeGroups() | 794 | void removeGroups() |
795 | { | 795 | { |
796 | for (u32 i=0; i<groups.size(); ++i) | 796 | for (u32 i=0; i<groups.size(); ++i) |
797 | if (groups[i].pixels.size() == 0) | 797 | if (groups[i].pixels.size() == 0) |
798 | groups.erase(i--); | 798 | groups.erase(i--); |
799 | 799 | ||
800 | /*for (s32 y=0; y <height; ++y) | 800 | /*for (s32 y=0; y <height; ++y) |
801 | { | 801 | { |
802 | printf("\n"); | 802 | printf("\n"); |
803 | for (s32 x=0; x <width; ++x) | 803 | for (s32 x=0; x <width; ++x) |
804 | { | 804 | { |
805 | s32 i; | 805 | s32 i; |
806 | for (i=0; i<groups.size(); ++i) | 806 | for (i=0; i<groups.size(); ++i) |
807 | { | 807 | { |
808 | bool k = groups[i].isMember(x,y); | 808 | bool k = groups[i].isMember(x,y); |
809 | if (k) | 809 | if (k) |
810 | break; | 810 | break; |
811 | } | 811 | } |
812 | printf("%d",i); | 812 | printf("%d",i); |
813 | } | 813 | } |
814 | }*/ | 814 | }*/ |
815 | 815 | ||
816 | 816 | ||
817 | } | 817 | } |
818 | 818 | ||
819 | // adds a pixel to its area, merging touching areas | 819 | // adds a pixel to its area, merging touching areas |
820 | void processPixel(s32 x, s32 y) | 820 | void processPixel(s32 x, s32 y) |
821 | { | 821 | { |
822 | // solid? | 822 | // solid? |
823 | if (getPixel(x,y)) | 823 | if (getPixel(x,y)) |
824 | { | 824 | { |
825 | s32 g=0, grp=0; | 825 | s32 g=0, grp=0; |
826 | 826 | ||
827 | bool found=false; | 827 | bool found=false; |
828 | if (x>0) // look one behind | 828 | if (x>0) // look one behind |
829 | { | 829 | { |
830 | grp = getRef(x-1,y); | 830 | grp = getRef(x-1,y); |
831 | if (grp) found=true; | 831 | if (grp) found=true; |
832 | } | 832 | } |
833 | if (y>0) // look above | 833 | if (y>0) // look above |
834 | { | 834 | { |
835 | if (x>0) // top left | 835 | if (x>0) // top left |
836 | { | 836 | { |
837 | g = getRef(x-1,y-1); | 837 | g = getRef(x-1,y-1); |
838 | 838 | ||
839 | if (g) | 839 | if (g) |
840 | { | 840 | { |
841 | if (found) | 841 | if (found) |
842 | { | 842 | { |
843 | mergeGroups(grp, g); | 843 | mergeGroups(grp, g); |
844 | } | 844 | } |
845 | else | 845 | else |
846 | { | 846 | { |
847 | grp = g; | 847 | grp = g; |
848 | found = true; | 848 | found = true; |
849 | } | 849 | } |
850 | } | 850 | } |
851 | } | 851 | } |
852 | 852 | ||
853 | if (x<width-1) // top right | 853 | if (x<width-1) // top right |
854 | { | 854 | { |
855 | g = getRef(x+1,y-1); | 855 | g = getRef(x+1,y-1); |
856 | 856 | ||
857 | if (g) | 857 | if (g) |
858 | { | 858 | { |
859 | if (found) | 859 | if (found) |
860 | { | 860 | { |
861 | mergeGroups(grp, g); | 861 | mergeGroups(grp, g); |
862 | } | 862 | } |
863 | else | 863 | else |
864 | { | 864 | { |
865 | grp = g; | 865 | grp = g; |
866 | found = true; | 866 | found = true; |
867 | } | 867 | } |
868 | } | 868 | } |
869 | } | 869 | } |
870 | 870 | ||
871 | // top | 871 | // top |
872 | 872 | ||
873 | g = getRef(x,y-1); | 873 | g = getRef(x,y-1); |
874 | 874 | ||
875 | if (g) | 875 | if (g) |
876 | { | 876 | { |
877 | if (found) | 877 | if (found) |
878 | { | 878 | { |
879 | mergeGroups(grp, g); | 879 | mergeGroups(grp, g); |
880 | } | 880 | } |
881 | else | 881 | else |
882 | { | 882 | { |
883 | grp = g; | 883 | grp = g; |
884 | found = true; | 884 | found = true; |
885 | } | 885 | } |
886 | } | 886 | } |
887 | 887 | ||
888 | } | 888 | } |
889 | 889 | ||
890 | // didn't find a group for this pixel, so we add one | 890 | // didn't find a group for this pixel, so we add one |
891 | if (!found) | 891 | if (!found) |
892 | { | 892 | { |
893 | SPixelGroup p(Device); | 893 | SPixelGroup p(Device); |
894 | p.pixels.push_back(core::position2di(x,y)); | 894 | p.pixels.push_back(core::position2di(x,y)); |
895 | groups.push_back(p); | 895 | groups.push_back(p); |
896 | groupRefs.push_back(groups.size()); | 896 | groupRefs.push_back(groups.size()); |
897 | grp=groups.size(); | 897 | grp=groups.size(); |
898 | } | 898 | } |
899 | else | 899 | else |
900 | { | 900 | { |
901 | groups[groupRefs[grp-1]-1].pixels.push_back(core::position2di(x,y)); | 901 | groups[groupRefs[grp-1]-1].pixels.push_back(core::position2di(x,y)); |
902 | } | 902 | } |
903 | setRef(x,y,groupRefs[grp-1]); | 903 | setRef(x,y,groupRefs[grp-1]); |
904 | } | 904 | } |
905 | } | 905 | } |
906 | 906 | ||
907 | bool& getPixel(s32 x, s32 y) { return mem[y*width +x]; } | 907 | bool& getPixel(s32 x, s32 y) { return mem[y*width +x]; } |
908 | s32& getRef(s32 x, s32 y) { return refbuffer[y*width +x]; } | 908 | s32& getRef(s32 x, s32 y) { return refbuffer[y*width +x]; } |
909 | void setRef(s32 x, s32 y, s32 g) { refbuffer[y*width +x] = g; } | 909 | void setRef(s32 x, s32 y, s32 g) { refbuffer[y*width +x] = g; } |
910 | 910 | ||
911 | void mergeGroups(s32 g1, s32 g2) | 911 | void mergeGroups(s32 g1, s32 g2) |
912 | { | 912 | { |
913 | if (g1==g2) | 913 | if (g1==g2) |
914 | return; | 914 | return; |
915 | // joins two groups together | 915 | // joins two groups together |
916 | for (u32 i=0; i<groups[g2-1].pixels.size(); ++i) | 916 | for (u32 i=0; i<groups[g2-1].pixels.size(); ++i) |
917 | groups[g1-1].pixels.push_back(groups[g2-1].pixels[i]); | 917 | groups[g1-1].pixels.push_back(groups[g2-1].pixels[i]); |
918 | groups[g2-1].pixels.clear(); | 918 | groups[g2-1].pixels.clear(); |
919 | groupRefs[g2-1] = g1; | 919 | groupRefs[g2-1] = g1; |
920 | } | 920 | } |
921 | 921 | ||
922 | s32 width, height; | 922 | s32 width, height; |
923 | core::array<SPixelGroup> groups; | 923 | core::array<SPixelGroup> groups; |
924 | core::array<s32> groupRefs; | 924 | core::array<s32> groupRefs; |
925 | core::array<s32> refbuffer; | 925 | core::array<s32> refbuffer; |
926 | bool *mem; | 926 | bool *mem; |
927 | IrrlichtDevice *Device; | 927 | IrrlichtDevice *Device; |
928 | }; | 928 | }; |
929 | 929 | ||
930 | // creates a simple vector font from a bitmap from the font tool | 930 | // creates a simple vector font from a bitmap from the font tool |
931 | class CVectorFontTool | 931 | class CVectorFontTool |
932 | { | 932 | { |
933 | public: | 933 | public: |
934 | CVectorFontTool(CFontTool *fonttool) : | 934 | CVectorFontTool(CFontTool *fonttool) : |
935 | triangulator(0), FontTool(fonttool), | 935 | triangulator(0), FontTool(fonttool), |
936 | letterHeight(0), letterWidth(0), triangles() | 936 | letterHeight(0), letterWidth(0), triangles() |
937 | { | 937 | { |
938 | core::map<wchar_t, u32>::Iterator it = FontTool->CharMap.getIterator(); | 938 | core::map<wchar_t, u32>::Iterator it = FontTool->CharMap.getIterator(); |
939 | 939 | ||
940 | while(!it.atEnd()) | 940 | while(!it.atEnd()) |
941 | { | 941 | { |
942 | CFontTool::SFontArea &fa = FontTool->Areas[(*it).getValue()]; | 942 | CFontTool::SFontArea &fa = FontTool->Areas[(*it).getValue()]; |
943 | 943 | ||
944 | if (fa.rectangle.getWidth() > letterWidth) | 944 | if (fa.rectangle.getWidth() > letterWidth) |
945 | letterWidth = fa.rectangle.getWidth(); | 945 | letterWidth = fa.rectangle.getWidth(); |
946 | if (fa.rectangle.getHeight() > letterHeight) | 946 | if (fa.rectangle.getHeight() > letterHeight) |
947 | letterHeight = fa.rectangle.getHeight(); | 947 | letterHeight = fa.rectangle.getHeight(); |
948 | 948 | ||
949 | it++; | 949 | it++; |
950 | } | 950 | } |
951 | 951 | ||
952 | // number of verts is one more than number of pixels because it's a grid of squares | 952 | // number of verts is one more than number of pixels because it's a grid of squares |
953 | letterWidth++; | 953 | letterWidth++; |
954 | letterHeight++; | 954 | letterHeight++; |
955 | 955 | ||
956 | // create image memory | 956 | // create image memory |
957 | imagedata.set_used(letterWidth*letterHeight); | 957 | imagedata.set_used(letterWidth*letterHeight); |
958 | 958 | ||
959 | // create vertex list, set position etc | 959 | // create vertex list, set position etc |
960 | verts.set_used(letterWidth*letterHeight); | 960 | verts.set_used(letterWidth*letterHeight); |
961 | for (s32 y=0; y<letterHeight; ++y) | 961 | for (s32 y=0; y<letterHeight; ++y) |
962 | { | 962 | { |
963 | for (s32 x=0; x<letterWidth; ++x) | 963 | for (s32 x=0; x<letterWidth; ++x) |
964 | { | 964 | { |
965 | S3DVertex &v = getVert(x,y); | 965 | S3DVertex &v = getVert(x,y); |
966 | v.Pos = core::vector3df((f32)x,(f32)y,0.0f); | 966 | v.Pos = core::vector3df((f32)x,(f32)y,0.0f); |
967 | v.TCoords.X = (f32)letterWidth / (f32)x; | 967 | v.TCoords.X = (f32)letterWidth / (f32)x; |
968 | v.TCoords.Y = (f32)letterHeight / (f32)y; | 968 | v.TCoords.Y = (f32)letterHeight / (f32)y; |
969 | v.Normal = core::vector3df(0,0,-1); | 969 | v.Normal = core::vector3df(0,0,-1); |
970 | v.Color = SColor(255,255,255,255); | 970 | v.Color = SColor(255,255,255,255); |
971 | } | 971 | } |
972 | } | 972 | } |
973 | // clear index list | 973 | // clear index list |
974 | inds.clear(); | 974 | inds.clear(); |
975 | 975 | ||
976 | // create each char in the font... | 976 | // create each char in the font... |
977 | it = FontTool->CharMap.getIterator(); | 977 | it = FontTool->CharMap.getIterator(); |
978 | while(!it.atEnd()) | 978 | while(!it.atEnd()) |
979 | { | 979 | { |
980 | addChar((*it).getKey()); | 980 | addChar((*it).getKey()); |
981 | it++; | 981 | it++; |
982 | } | 982 | } |
983 | } | 983 | } |
984 | 984 | ||
985 | ~CVectorFontTool() | 985 | ~CVectorFontTool() |
986 | { | 986 | { |
987 | if (triangulator) | 987 | if (triangulator) |
988 | delete triangulator; | 988 | delete triangulator; |
989 | } | 989 | } |
990 | 990 | ||
991 | void addChar(wchar_t thischar) | 991 | void addChar(wchar_t thischar) |
992 | { | 992 | { |
993 | const s32 area = FontTool->CharMap[thischar]; | 993 | const s32 area = FontTool->CharMap[thischar]; |
994 | const CFontTool::SFontArea &fa = FontTool->Areas[area]; | 994 | const CFontTool::SFontArea &fa = FontTool->Areas[area]; |
995 | 995 | ||
996 | const s32 img = fa.sourceimage; | 996 | const s32 img = fa.sourceimage; |
997 | const core::rect<s32>& r = fa.rectangle; | 997 | const core::rect<s32>& r = fa.rectangle; |
998 | 998 | ||
999 | // init image memory | 999 | // init image memory |
1000 | IImage *image = FontTool->currentImages[img]; | 1000 | IImage *image = FontTool->currentImages[img]; |
1001 | for (u32 i=0; i < imagedata.size(); ++i) | 1001 | for (u32 i=0; i < imagedata.size(); ++i) |
1002 | imagedata[i] = false; | 1002 | imagedata[i] = false; |
1003 | for (s32 y=r.UpperLeftCorner.Y; y < r.LowerRightCorner.Y; ++y) | 1003 | for (s32 y=r.UpperLeftCorner.Y; y < r.LowerRightCorner.Y; ++y) |
1004 | { | 1004 | { |
1005 | for (s32 x=r.UpperLeftCorner.X; x < r.LowerRightCorner.X ; ++x) | 1005 | for (s32 x=r.UpperLeftCorner.X; x < r.LowerRightCorner.X ; ++x) |
1006 | if (image->getPixel(x,y).getBlue() > 0) | 1006 | if (image->getPixel(x,y).getBlue() > 0) |
1007 | { | 1007 | { |
1008 | imagedata[letterWidth*(y-r.UpperLeftCorner.Y) +(x-r.UpperLeftCorner.X)] = true; | 1008 | imagedata[letterWidth*(y-r.UpperLeftCorner.Y) +(x-r.UpperLeftCorner.X)] = true; |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | 1011 | ||
1012 | // get shape areas | 1012 | // get shape areas |
1013 | triangulator = new CGroupFinder(imagedata.pointer(), letterWidth, letterHeight, FontTool->Device ); | 1013 | triangulator = new CGroupFinder(imagedata.pointer(), letterWidth, letterHeight, FontTool->Device ); |
1014 | 1014 | ||
1015 | wprintf(L"Created character '%c' in texture %d\n", thischar, img ); | 1015 | wprintf(L"Created character '%c' in texture %d\n", thischar, img ); |
1016 | 1016 | ||
1017 | //floodfill->drawEdges(FontTool->Device, 500, 3); | 1017 | //floodfill->drawEdges(FontTool->Device, 500, 3); |
1018 | //floodfill->drawTriangles(FontTool->Device, 500,30); | 1018 | //floodfill->drawTriangles(FontTool->Device, 500,30); |
1019 | //floodfill->drawTriLines(FontTool->Device, 200,3); | 1019 | //floodfill->drawTriLines(FontTool->Device, 200,3); |
1020 | 1020 | ||
1021 | /* | 1021 | /* |
1022 | if (area==32 && map == 0) | 1022 | if (area==32 && map == 0) |
1023 | { | 1023 | { |
1024 | scene::ISceneManager *smgr = FontTool->Device->getSceneManager(); | 1024 | scene::ISceneManager *smgr = FontTool->Device->getSceneManager(); |
1025 | smgr->addCameraSceneNodeFPS(); | 1025 | smgr->addCameraSceneNodeFPS(); |
1026 | while(FontTool->Device->run()) | 1026 | while(FontTool->Device->run()) |
1027 | { | 1027 | { |
1028 | //floodfill->drawEdges(FontTool->Device, 100, 30); | 1028 | //floodfill->drawEdges(FontTool->Device, 100, 30); |
1029 | FontTool->Device->getVideoDriver()->beginScene(true, true, video::SColor(0,200,200,200)); | 1029 | FontTool->Device->getVideoDriver()->beginScene(true, true, video::SColor(0,200,200,200)); |
1030 | smgr->drawAll(); | 1030 | smgr->drawAll(); |
1031 | floodfill->drawTri3D(FontTool->Device, 100); | 1031 | floodfill->drawTri3D(FontTool->Device, 100); |
1032 | FontTool->Device->getVideoDriver()->endScene(); | 1032 | FontTool->Device->getVideoDriver()->endScene(); |
1033 | } | 1033 | } |
1034 | }*/ | 1034 | }*/ |
1035 | 1035 | ||
1036 | u32 lastind = triangles.indexes.size(); | 1036 | u32 lastind = triangles.indexes.size(); |
1037 | 1037 | ||
1038 | // loop through each shape and add it to the current character... | 1038 | // loop through each shape and add it to the current character... |
1039 | for (u32 i=0; i < triangulator->groups.size(); ++i) | 1039 | for (u32 i=0; i < triangulator->groups.size(); ++i) |
1040 | triangles += triangulator->groups[i].triangles; | 1040 | triangles += triangulator->groups[i].triangles; |
1041 | 1041 | ||
1042 | // add character details | 1042 | // add character details |
1043 | charstarts.push_back(lastind); | 1043 | charstarts.push_back(lastind); |
1044 | charlengths.push_back(triangles.indexes.size() - lastind); | 1044 | charlengths.push_back(triangles.indexes.size() - lastind); |
1045 | chars.push_back(thischar); | 1045 | chars.push_back(thischar); |
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | bool saveVectorFont(const c8 *filename, const c8 *formatname) | 1048 | bool saveVectorFont(const c8 *filename, const c8 *formatname) |
1049 | { | 1049 | { |
1050 | IrrlichtDevice *Device = FontTool->Device; | 1050 | IrrlichtDevice *Device = FontTool->Device; |
1051 | 1051 | ||
1052 | if (triangles.indexes.size() == 0) | 1052 | if (triangles.indexes.size() == 0) |
1053 | { | 1053 | { |
1054 | Device->getLogger()->log("No vector data to write, aborting."); | 1054 | Device->getLogger()->log("No vector data to write, aborting."); |
1055 | return false; | 1055 | return false; |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | core::stringc fn = filename; | 1058 | core::stringc fn = filename; |
1059 | 1059 | ||
1060 | if (core::stringc(formatname) == core::stringc("xml")) | 1060 | if (core::stringc(formatname) == core::stringc("xml")) |
1061 | { | 1061 | { |
1062 | fn += ".xml"; | 1062 | fn += ".xml"; |
1063 | io::IXMLWriter *writer = FontTool->Device->getFileSystem()->createXMLWriter(fn.c_str()); | 1063 | io::IXMLWriter *writer = FontTool->Device->getFileSystem()->createXMLWriter(fn.c_str()); |
1064 | 1064 | ||
1065 | // header and line breaks | 1065 | // header and line breaks |
1066 | writer->writeXMLHeader(); | 1066 | writer->writeXMLHeader(); |
1067 | writer->writeLineBreak(); | 1067 | writer->writeLineBreak(); |
1068 | 1068 | ||
1069 | // write info header | 1069 | // write info header |
1070 | writer->writeElement(L"font", false, L"type", L"vector"); | 1070 | writer->writeElement(L"font", false, L"type", L"vector"); |
1071 | writer->writeLineBreak(); | 1071 | writer->writeLineBreak(); |
1072 | writer->writeLineBreak(); | 1072 | writer->writeLineBreak(); |
1073 | 1073 | ||
1074 | // write each letter | 1074 | // write each letter |
1075 | 1075 | ||
1076 | for (u32 n=0; n<chars.size(); ++n) | 1076 | for (u32 n=0; n<chars.size(); ++n) |
1077 | { | 1077 | { |
1078 | u32 i = FontTool->CharMap[chars[n]]; | 1078 | u32 i = FontTool->CharMap[chars[n]]; |
1079 | CFontTool::SFontArea &fa = FontTool->Areas[i]; | 1079 | CFontTool::SFontArea &fa = FontTool->Areas[i]; |
1080 | wchar_t c[2]; | 1080 | wchar_t c[2]; |
1081 | c[0] = chars[n]; | 1081 | c[0] = chars[n]; |
1082 | c[1] = L'\0'; | 1082 | c[1] = L'\0'; |
1083 | core::stringw area, under, over; | 1083 | core::stringw area, under, over; |
1084 | area = core::stringw(fa.rectangle.LowerRightCorner.X- | 1084 | area = core::stringw(fa.rectangle.LowerRightCorner.X- |
1085 | fa.rectangle.UpperLeftCorner.X); | 1085 | fa.rectangle.UpperLeftCorner.X); |
1086 | area += L", "; | 1086 | area += L", "; |
1087 | area += fa.rectangle.LowerRightCorner.Y- | 1087 | area += fa.rectangle.LowerRightCorner.Y- |
1088 | fa.rectangle.UpperLeftCorner.Y; | 1088 | fa.rectangle.UpperLeftCorner.Y; |
1089 | 1089 | ||
1090 | 1090 | ||
1091 | core::array<core::stringw> names; | 1091 | core::array<core::stringw> names; |
1092 | core::array<core::stringw> values; | 1092 | core::array<core::stringw> values; |
1093 | names.clear(); | 1093 | names.clear(); |
1094 | values.clear(); | 1094 | values.clear(); |
1095 | // char | 1095 | // char |
1096 | names.push_back(core::stringw(L"c")); | 1096 | names.push_back(core::stringw(L"c")); |
1097 | values.push_back(core::stringw(c)); | 1097 | values.push_back(core::stringw(c)); |
1098 | 1098 | ||
1099 | // width+height | 1099 | // width+height |
1100 | names.push_back(core::stringw(L"wh")); | 1100 | names.push_back(core::stringw(L"wh")); |
1101 | values.push_back(area); | 1101 | values.push_back(area); |
1102 | 1102 | ||
1103 | // start | 1103 | // start |
1104 | names.push_back(core::stringw(L"st")); | 1104 | names.push_back(core::stringw(L"st")); |
1105 | values.push_back(core::stringw(charstarts[n])); | 1105 | values.push_back(core::stringw(charstarts[n])); |
1106 | // length | 1106 | // length |
1107 | names.push_back(core::stringw(L"len")); | 1107 | names.push_back(core::stringw(L"len")); |
1108 | values.push_back(core::stringw(charlengths[n])); | 1108 | values.push_back(core::stringw(charlengths[n])); |
1109 | 1109 | ||
1110 | if (fa.underhang != 0) | 1110 | if (fa.underhang != 0) |
1111 | { | 1111 | { |
1112 | under = core::stringw(fa.underhang); | 1112 | under = core::stringw(fa.underhang); |
1113 | names.push_back(core::stringw(L"u")); | 1113 | names.push_back(core::stringw(L"u")); |
1114 | values.push_back(under); | 1114 | values.push_back(under); |
1115 | } | 1115 | } |
1116 | if (fa.overhang != 0) | 1116 | if (fa.overhang != 0) |
1117 | { | 1117 | { |
1118 | over = core::stringw(fa.overhang); | 1118 | over = core::stringw(fa.overhang); |
1119 | names.push_back(core::stringw(L"o")); | 1119 | names.push_back(core::stringw(L"o")); |
1120 | values.push_back(over); | 1120 | values.push_back(over); |
1121 | } | 1121 | } |
1122 | writer->writeElement(L"c", true, names, values); | 1122 | writer->writeElement(L"c", true, names, values); |
1123 | 1123 | ||
1124 | writer->writeLineBreak(); | 1124 | writer->writeLineBreak(); |
1125 | } | 1125 | } |
1126 | 1126 | ||
1127 | // write vertex data | 1127 | // write vertex data |
1128 | core::stringw data, count; | 1128 | core::stringw data, count; |
1129 | data = L""; | 1129 | data = L""; |
1130 | count = core::stringw(triangles.positions.size()); | 1130 | count = core::stringw(triangles.positions.size()); |
1131 | for (u32 i=0; i<triangles.positions.size(); ++i) | 1131 | for (u32 i=0; i<triangles.positions.size(); ++i) |
1132 | { | 1132 | { |
1133 | if (i!=0) | 1133 | if (i!=0) |
1134 | data += L", "; | 1134 | data += L", "; |
1135 | data += (s32)triangles.positions[i].X; | 1135 | data += (s32)triangles.positions[i].X; |
1136 | data += L","; | 1136 | data += L","; |
1137 | data += (s32)triangles.positions[i].Y; | 1137 | data += (s32)triangles.positions[i].Y; |
1138 | } | 1138 | } |
1139 | writer->writeElement(L"Vertices", true, L"count", count.c_str(), L"data", data.c_str()); | 1139 | writer->writeElement(L"Vertices", true, L"count", count.c_str(), L"data", data.c_str()); |
1140 | writer->writeLineBreak(); | 1140 | writer->writeLineBreak(); |
1141 | 1141 | ||
1142 | // write index list | 1142 | // write index list |
1143 | data = L""; | 1143 | data = L""; |
1144 | count = core::stringw(triangles.indexes.size()); | 1144 | count = core::stringw(triangles.indexes.size()); |
1145 | for (u32 i=0; i<triangles.indexes.size(); i+=3) | 1145 | for (u32 i=0; i<triangles.indexes.size(); i+=3) |
1146 | { | 1146 | { |
1147 | if (i!=0) | 1147 | if (i!=0) |
1148 | data += L", "; | 1148 | data += L", "; |
1149 | data += triangles.indexes[i+0]; | 1149 | data += triangles.indexes[i+0]; |
1150 | data += L","; | 1150 | data += L","; |
1151 | data += triangles.indexes[i+1], | 1151 | data += triangles.indexes[i+1], |
1152 | data += L","; | 1152 | data += L","; |
1153 | data += triangles.indexes[i+2]; | 1153 | data += triangles.indexes[i+2]; |
1154 | } | 1154 | } |
1155 | 1155 | ||
1156 | writer->writeElement(L"Indices", true, L"count", count.c_str(), L"data", data.c_str()); | 1156 | writer->writeElement(L"Indices", true, L"count", count.c_str(), L"data", data.c_str()); |
1157 | writer->writeLineBreak(); | 1157 | writer->writeLineBreak(); |
1158 | 1158 | ||
1159 | writer->writeClosingTag(L"font"); | 1159 | writer->writeClosingTag(L"font"); |
1160 | 1160 | ||
1161 | writer->drop(); | 1161 | writer->drop(); |
1162 | 1162 | ||
1163 | Device->getLogger()->log("Font saved."); | 1163 | Device->getLogger()->log("Font saved."); |
1164 | return true; | 1164 | return true; |
1165 | 1165 | ||
1166 | } | 1166 | } |
1167 | else if (core::stringc(formatname) == core::stringc("bin")) | 1167 | else if (core::stringc(formatname) == core::stringc("bin")) |
1168 | { | 1168 | { |
1169 | FontTool->Device->getLogger()->log("binary fonts not supported yet, sorry"); | 1169 | FontTool->Device->getLogger()->log("binary fonts not supported yet, sorry"); |
1170 | return false; | 1170 | return false; |
1171 | } | 1171 | } |
1172 | else | 1172 | else |
1173 | { | 1173 | { |
1174 | FontTool->Device->getLogger()->log("unsupported file format, unable to save vector font"); | 1174 | FontTool->Device->getLogger()->log("unsupported file format, unable to save vector font"); |
1175 | return false; | 1175 | return false; |
1176 | } | 1176 | } |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | S3DVertex& getVert(s32 x, s32 y) { return verts[letterWidth*y +x]; } | 1179 | S3DVertex& getVert(s32 x, s32 y) { return verts[letterWidth*y +x]; } |
1180 | 1180 | ||
1181 | core::array<S3DVertex> verts; | 1181 | core::array<S3DVertex> verts; |
1182 | core::array<u16> inds; | 1182 | core::array<u16> inds; |
1183 | core::array<bool> imagedata; | 1183 | core::array<bool> imagedata; |
1184 | 1184 | ||
1185 | core::array<s32> charstarts; // start position of each char | 1185 | core::array<s32> charstarts; // start position of each char |
1186 | core::array<s32> charlengths; // index count | 1186 | core::array<s32> charlengths; // index count |
1187 | core::array<wchar_t> chars; // letters | 1187 | core::array<wchar_t> chars; // letters |
1188 | 1188 | ||
1189 | CGroupFinder* triangulator; | 1189 | CGroupFinder* triangulator; |
1190 | CFontTool* FontTool; | 1190 | CFontTool* FontTool; |
1191 | 1191 | ||
1192 | s32 letterHeight; | 1192 | s32 letterHeight; |
1193 | s32 letterWidth; | 1193 | s32 letterWidth; |
1194 | 1194 | ||
1195 | STriangleList triangles; | 1195 | STriangleList triangles; |
1196 | }; | 1196 | }; |
1197 | 1197 | ||
1198 | #endif // __VECTOR_FONT_TOOL_INCLUDED__ | 1198 | #endif // __VECTOR_FONT_TOOL_INCLUDED__ |
1199 | 1199 | ||
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/Makefile b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/Makefile index 7444e44..b3f2731 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/Makefile +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/Makefile | |||
@@ -1,38 +1,38 @@ | |||
1 | # Makefile for Irrlicht Examples | 1 | # Makefile for Irrlicht Examples |
2 | # It's usually sufficient to change just the target name and source file list | 2 | # It's usually sufficient to change just the target name and source file list |
3 | # and be sure that CXX is set to a valid compiler | 3 | # and be sure that CXX is set to a valid compiler |
4 | Target = FontTool | 4 | Target = FontTool |
5 | Sources = CFontTool.cpp main.cpp | 5 | Sources = CFontTool.cpp main.cpp |
6 | 6 | ||
7 | # general compiler settings | 7 | # general compiler settings |
8 | CPPFLAGS = -I../../../include -I/usr/X11R6/include -I/usr/include/freetype2/ | 8 | CPPFLAGS = -I../../../include -I/usr/X11R6/include -I/usr/include/freetype2/ |
9 | CXXFLAGS = -O3 -ffast-math | 9 | CXXFLAGS = -O3 -ffast-math |
10 | #CXXFLAGS = -g -Wall | 10 | #CXXFLAGS = -g -Wall |
11 | 11 | ||
12 | #default target is Linux | 12 | #default target is Linux |
13 | all: all_linux | 13 | all: all_linux |
14 | 14 | ||
15 | ifeq ($(HOSTTYPE), x86_64) | 15 | ifeq ($(HOSTTYPE), x86_64) |
16 | LIBSELECT=64 | 16 | LIBSELECT=64 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | # target specific settings | 19 | # target specific settings |
20 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXft | 20 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXft |
21 | all_linux clean_linux: SYSTEM=Linux | 21 | all_linux clean_linux: SYSTEM=Linux |
22 | all_win32: LDFLAGS = -L../../../lib/Win32-gcc -lIrrlicht -lgdi32 -lopengl32 -lglu32 -lm | 22 | all_win32: LDFLAGS = -L../../../lib/Win32-gcc -lIrrlicht -lgdi32 -lopengl32 -lglu32 -lm |
23 | all_win32 clean_win32: SYSTEM=Win32-gcc | 23 | all_win32 clean_win32: SYSTEM=Win32-gcc |
24 | all_win32 clean_win32: SUF=.exe | 24 | all_win32 clean_win32: SUF=.exe |
25 | # name of the binary - only valid for targets which set SYSTEM | 25 | # name of the binary - only valid for targets which set SYSTEM |
26 | DESTPATH = ../../../bin/$(SYSTEM)/$(Target)$(SUF) | 26 | DESTPATH = ../../../bin/$(SYSTEM)/$(Target)$(SUF) |
27 | 27 | ||
28 | all_linux all_win32: | 28 | all_linux all_win32: |
29 | $(warning Building...) | 29 | $(warning Building...) |
30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) | 30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) |
31 | 31 | ||
32 | clean: clean_linux clean_win32 | 32 | clean: clean_linux clean_win32 |
33 | $(warning Cleaning...) | 33 | $(warning Cleaning...) |
34 | 34 | ||
35 | clean_linux clean_win32: | 35 | clean_linux clean_win32: |
36 | @$(RM) $(DESTPATH) | 36 | @$(RM) $(DESTPATH) |
37 | 37 | ||
38 | .PHONY: all all_win32 clean clean_linux clean_win32 | 38 | .PHONY: all all_win32 clean clean_linux clean_win32 |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln index 1e24460..a5b9269 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.sln | |||
@@ -1,20 +1,20 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 9.00 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 |
3 | # Visual C++ Express 2005 | 3 | # Visual C++ Express 2005 |
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_v8.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_v8.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" |
5 | EndProject | 5 | EndProject |
6 | Global | 6 | Global |
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
8 | Debug|Win32 = Debug|Win32 | 8 | Debug|Win32 = Debug|Win32 |
9 | Release|Win32 = Release|Win32 | 9 | Release|Win32 = Release|Win32 |
10 | EndGlobalSection | 10 | EndGlobalSection |
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 | 12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 |
13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 | 13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 |
14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 | 14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 |
15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 | 15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 |
16 | EndGlobalSection | 16 | EndGlobalSection |
17 | GlobalSection(SolutionProperties) = preSolution | 17 | GlobalSection(SolutionProperties) = preSolution |
18 | HideSolutionNode = FALSE | 18 | HideSolutionNode = FALSE |
19 | EndGlobalSection | 19 | EndGlobalSection |
20 | EndGlobal | 20 | EndGlobal |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj index fcb71a1..56cc087 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v8.vcproj | |||
@@ -1,201 +1,201 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="8.00" | 4 | Version="8.00" |
5 | Name="Font Tool" | 5 | Name="Font Tool" |
6 | ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" | 6 | ProjectGUID="{853A396E-C031-4C26-A716-5B4E176BE11D}" |
7 | Keyword="Win32Proj" | 7 | Keyword="Win32Proj" |
8 | > | 8 | > |
9 | <Platforms> | 9 | <Platforms> |
10 | <Platform | 10 | <Platform |
11 | Name="Win32" | 11 | Name="Win32" |
12 | /> | 12 | /> |
13 | </Platforms> | 13 | </Platforms> |
14 | <ToolFiles> | 14 | <ToolFiles> |
15 | </ToolFiles> | 15 | </ToolFiles> |
16 | <Configurations> | 16 | <Configurations> |
17 | <Configuration | 17 | <Configuration |
18 | Name="Debug|Win32" | 18 | Name="Debug|Win32" |
19 | OutputDirectory="Debug" | 19 | OutputDirectory="Debug" |
20 | IntermediateDirectory="Debug" | 20 | IntermediateDirectory="Debug" |
21 | ConfigurationType="1" | 21 | ConfigurationType="1" |
22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 22 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
23 | CharacterSet="2" | 23 | CharacterSet="2" |
24 | > | 24 | > |
25 | <Tool | 25 | <Tool |
26 | Name="VCPreBuildEventTool" | 26 | Name="VCPreBuildEventTool" |
27 | /> | 27 | /> |
28 | <Tool | 28 | <Tool |
29 | Name="VCCustomBuildTool" | 29 | Name="VCCustomBuildTool" |
30 | /> | 30 | /> |
31 | <Tool | 31 | <Tool |
32 | Name="VCXMLDataGeneratorTool" | 32 | Name="VCXMLDataGeneratorTool" |
33 | /> | 33 | /> |
34 | <Tool | 34 | <Tool |
35 | Name="VCWebServiceProxyGeneratorTool" | 35 | Name="VCWebServiceProxyGeneratorTool" |
36 | /> | 36 | /> |
37 | <Tool | 37 | <Tool |
38 | Name="VCMIDLTool" | 38 | Name="VCMIDLTool" |
39 | /> | 39 | /> |
40 | <Tool | 40 | <Tool |
41 | Name="VCCLCompilerTool" | 41 | Name="VCCLCompilerTool" |
42 | Optimization="0" | 42 | Optimization="0" |
43 | AdditionalIncludeDirectories="../../../include" | 43 | AdditionalIncludeDirectories="../../../include" |
44 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 44 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
45 | MinimalRebuild="true" | 45 | MinimalRebuild="true" |
46 | BasicRuntimeChecks="3" | 46 | BasicRuntimeChecks="3" |
47 | RuntimeLibrary="1" | 47 | RuntimeLibrary="1" |
48 | UsePrecompiledHeader="0" | 48 | UsePrecompiledHeader="0" |
49 | WarningLevel="3" | 49 | WarningLevel="3" |
50 | Detect64BitPortabilityProblems="true" | 50 | Detect64BitPortabilityProblems="true" |
51 | DebugInformationFormat="4" | 51 | DebugInformationFormat="4" |
52 | /> | 52 | /> |
53 | <Tool | 53 | <Tool |
54 | Name="VCManagedResourceCompilerTool" | 54 | Name="VCManagedResourceCompilerTool" |
55 | /> | 55 | /> |
56 | <Tool | 56 | <Tool |
57 | Name="VCResourceCompilerTool" | 57 | Name="VCResourceCompilerTool" |
58 | /> | 58 | /> |
59 | <Tool | 59 | <Tool |
60 | Name="VCPreLinkEventTool" | 60 | Name="VCPreLinkEventTool" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCLinkerTool" | 63 | Name="VCLinkerTool" |
64 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" | 64 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" |
65 | OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" | 65 | OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" |
66 | LinkIncremental="2" | 66 | LinkIncremental="2" |
67 | GenerateDebugInformation="true" | 67 | GenerateDebugInformation="true" |
68 | ProgramDatabaseFile="$(OutDir)/TestProject.pdb" | 68 | ProgramDatabaseFile="$(OutDir)/TestProject.pdb" |
69 | SubSystem="1" | 69 | SubSystem="1" |
70 | TargetMachine="1" | 70 | TargetMachine="1" |
71 | /> | 71 | /> |
72 | <Tool | 72 | <Tool |
73 | Name="VCALinkTool" | 73 | Name="VCALinkTool" |
74 | /> | 74 | /> |
75 | <Tool | 75 | <Tool |
76 | Name="VCManifestTool" | 76 | Name="VCManifestTool" |
77 | /> | 77 | /> |
78 | <Tool | 78 | <Tool |
79 | Name="VCXDCMakeTool" | 79 | Name="VCXDCMakeTool" |
80 | /> | 80 | /> |
81 | <Tool | 81 | <Tool |
82 | Name="VCBscMakeTool" | 82 | Name="VCBscMakeTool" |
83 | /> | 83 | /> |
84 | <Tool | 84 | <Tool |
85 | Name="VCFxCopTool" | 85 | Name="VCFxCopTool" |
86 | /> | 86 | /> |
87 | <Tool | 87 | <Tool |
88 | Name="VCAppVerifierTool" | 88 | Name="VCAppVerifierTool" |
89 | /> | 89 | /> |
90 | <Tool | 90 | <Tool |
91 | Name="VCWebDeploymentTool" | 91 | Name="VCWebDeploymentTool" |
92 | /> | 92 | /> |
93 | <Tool | 93 | <Tool |
94 | Name="VCPostBuildEventTool" | 94 | Name="VCPostBuildEventTool" |
95 | /> | 95 | /> |
96 | </Configuration> | 96 | </Configuration> |
97 | <Configuration | 97 | <Configuration |
98 | Name="Release|Win32" | 98 | Name="Release|Win32" |
99 | OutputDirectory="Release" | 99 | OutputDirectory="Release" |
100 | IntermediateDirectory="Release" | 100 | IntermediateDirectory="Release" |
101 | ConfigurationType="1" | 101 | ConfigurationType="1" |
102 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 102 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
103 | CharacterSet="2" | 103 | CharacterSet="2" |
104 | WholeProgramOptimization="1" | 104 | WholeProgramOptimization="1" |
105 | > | 105 | > |
106 | <Tool | 106 | <Tool |
107 | Name="VCPreBuildEventTool" | 107 | Name="VCPreBuildEventTool" |
108 | /> | 108 | /> |
109 | <Tool | 109 | <Tool |
110 | Name="VCCustomBuildTool" | 110 | Name="VCCustomBuildTool" |
111 | /> | 111 | /> |
112 | <Tool | 112 | <Tool |
113 | Name="VCXMLDataGeneratorTool" | 113 | Name="VCXMLDataGeneratorTool" |
114 | /> | 114 | /> |
115 | <Tool | 115 | <Tool |
116 | Name="VCWebServiceProxyGeneratorTool" | 116 | Name="VCWebServiceProxyGeneratorTool" |
117 | /> | 117 | /> |
118 | <Tool | 118 | <Tool |
119 | Name="VCMIDLTool" | 119 | Name="VCMIDLTool" |
120 | /> | 120 | /> |
121 | <Tool | 121 | <Tool |
122 | Name="VCCLCompilerTool" | 122 | Name="VCCLCompilerTool" |
123 | WholeProgramOptimization="true" | 123 | WholeProgramOptimization="true" |
124 | AdditionalIncludeDirectories="..\..\include" | 124 | AdditionalIncludeDirectories="..\..\include" |
125 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 125 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
126 | RuntimeLibrary="0" | 126 | RuntimeLibrary="0" |
127 | UsePrecompiledHeader="0" | 127 | UsePrecompiledHeader="0" |
128 | WarningLevel="3" | 128 | WarningLevel="3" |
129 | Detect64BitPortabilityProblems="true" | 129 | Detect64BitPortabilityProblems="true" |
130 | DebugInformationFormat="3" | 130 | DebugInformationFormat="3" |
131 | /> | 131 | /> |
132 | <Tool | 132 | <Tool |
133 | Name="VCManagedResourceCompilerTool" | 133 | Name="VCManagedResourceCompilerTool" |
134 | /> | 134 | /> |
135 | <Tool | 135 | <Tool |
136 | Name="VCResourceCompilerTool" | 136 | Name="VCResourceCompilerTool" |
137 | /> | 137 | /> |
138 | <Tool | 138 | <Tool |
139 | Name="VCPreLinkEventTool" | 139 | Name="VCPreLinkEventTool" |
140 | /> | 140 | /> |
141 | <Tool | 141 | <Tool |
142 | Name="VCLinkerTool" | 142 | Name="VCLinkerTool" |
143 | OutputFile="../../bin/Win32-visualstudio/FontTool.exe" | 143 | OutputFile="../../bin/Win32-visualstudio/FontTool.exe" |
144 | LinkIncremental="1" | 144 | LinkIncremental="1" |
145 | GenerateDebugInformation="true" | 145 | GenerateDebugInformation="true" |
146 | SubSystem="1" | 146 | SubSystem="1" |
147 | OptimizeReferences="2" | 147 | OptimizeReferences="2" |
148 | EnableCOMDATFolding="2" | 148 | EnableCOMDATFolding="2" |
149 | LinkTimeCodeGeneration="1" | 149 | LinkTimeCodeGeneration="1" |
150 | TargetMachine="1" | 150 | TargetMachine="1" |
151 | /> | 151 | /> |
152 | <Tool | 152 | <Tool |
153 | Name="VCALinkTool" | 153 | Name="VCALinkTool" |
154 | /> | 154 | /> |
155 | <Tool | 155 | <Tool |
156 | Name="VCManifestTool" | 156 | Name="VCManifestTool" |
157 | /> | 157 | /> |
158 | <Tool | 158 | <Tool |
159 | Name="VCXDCMakeTool" | 159 | Name="VCXDCMakeTool" |
160 | /> | 160 | /> |
161 | <Tool | 161 | <Tool |
162 | Name="VCBscMakeTool" | 162 | Name="VCBscMakeTool" |
163 | /> | 163 | /> |
164 | <Tool | 164 | <Tool |
165 | Name="VCFxCopTool" | 165 | Name="VCFxCopTool" |
166 | /> | 166 | /> |
167 | <Tool | 167 | <Tool |
168 | Name="VCAppVerifierTool" | 168 | Name="VCAppVerifierTool" |
169 | /> | 169 | /> |
170 | <Tool | 170 | <Tool |
171 | Name="VCWebDeploymentTool" | 171 | Name="VCWebDeploymentTool" |
172 | /> | 172 | /> |
173 | <Tool | 173 | <Tool |
174 | Name="VCPostBuildEventTool" | 174 | Name="VCPostBuildEventTool" |
175 | /> | 175 | /> |
176 | </Configuration> | 176 | </Configuration> |
177 | </Configurations> | 177 | </Configurations> |
178 | <References> | 178 | <References> |
179 | </References> | 179 | </References> |
180 | <Files> | 180 | <Files> |
181 | <File | 181 | <File |
182 | RelativePath=".\CFontTool.cpp" | 182 | RelativePath=".\CFontTool.cpp" |
183 | > | 183 | > |
184 | </File> | 184 | </File> |
185 | <File | 185 | <File |
186 | RelativePath=".\CFontTool.h" | 186 | RelativePath=".\CFontTool.h" |
187 | > | 187 | > |
188 | </File> | 188 | </File> |
189 | <File | 189 | <File |
190 | RelativePath=".\CVectorFontTool.h" | 190 | RelativePath=".\CVectorFontTool.h" |
191 | > | 191 | > |
192 | </File> | 192 | </File> |
193 | <File | 193 | <File |
194 | RelativePath=".\main.cpp" | 194 | RelativePath=".\main.cpp" |
195 | > | 195 | > |
196 | </File> | 196 | </File> |
197 | </Files> | 197 | </Files> |
198 | <Globals> | 198 | <Globals> |
199 | </Globals> | 199 | </Globals> |
200 | </VisualStudioProject> | 200 | </VisualStudioProject> |
201 | 201 | ||
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln index be110b8..7120ffb 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.sln | |||
@@ -1,20 +1,20 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 10.00 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 |
3 | # Visual C++ Express 2008 | 3 | # Visual C++ Express 2008 |
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_v9.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}" |
5 | EndProject | 5 | EndProject |
6 | Global | 6 | Global |
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
8 | Debug|Win32 = Debug|Win32 | 8 | Debug|Win32 = Debug|Win32 |
9 | Release|Win32 = Release|Win32 | 9 | Release|Win32 = Release|Win32 |
10 | EndGlobalSection | 10 | EndGlobalSection |
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 | 12 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.ActiveCfg = Debug|Win32 |
13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 | 13 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Debug|Win32.Build.0 = Debug|Win32 |
14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 | 14 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.ActiveCfg = Release|Win32 |
15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 | 15 | {853A396E-C031-4C26-A716-5B4E176BE11D}.Release|Win32.Build.0 = Release|Win32 |
16 | EndGlobalSection | 16 | EndGlobalSection |
17 | GlobalSection(SolutionProperties) = preSolution | 17 | GlobalSection(SolutionProperties) = preSolution |
18 | HideSolutionNode = FALSE | 18 | HideSolutionNode = FALSE |
19 | EndGlobalSection | 19 | EndGlobalSection |
20 | EndGlobal | 20 | EndGlobal |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj index 4fa1e4b..2c7f713 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_v9.vcproj | |||
@@ -1,202 +1,202 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="9,00" | 4 | Version="9,00" |
5 | Name="Font Tool" | 5 | Name="Font Tool" |
6 | ProjectGUID="{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" | 6 | ProjectGUID="{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" |
7 | Keyword="Win32Proj" | 7 | Keyword="Win32Proj" |
8 | TargetFrameworkVersion="131072" | 8 | TargetFrameworkVersion="131072" |
9 | > | 9 | > |
10 | <Platforms> | 10 | <Platforms> |
11 | <Platform | 11 | <Platform |
12 | Name="Win32" | 12 | Name="Win32" |
13 | /> | 13 | /> |
14 | </Platforms> | 14 | </Platforms> |
15 | <ToolFiles> | 15 | <ToolFiles> |
16 | </ToolFiles> | 16 | </ToolFiles> |
17 | <Configurations> | 17 | <Configurations> |
18 | <Configuration | 18 | <Configuration |
19 | Name="Debug|Win32" | 19 | Name="Debug|Win32" |
20 | OutputDirectory="Debug" | 20 | OutputDirectory="Debug" |
21 | IntermediateDirectory="Debug" | 21 | IntermediateDirectory="Debug" |
22 | ConfigurationType="1" | 22 | ConfigurationType="1" |
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
24 | CharacterSet="2" | 24 | CharacterSet="2" |
25 | > | 25 | > |
26 | <Tool | 26 | <Tool |
27 | Name="VCPreBuildEventTool" | 27 | Name="VCPreBuildEventTool" |
28 | /> | 28 | /> |
29 | <Tool | 29 | <Tool |
30 | Name="VCCustomBuildTool" | 30 | Name="VCCustomBuildTool" |
31 | /> | 31 | /> |
32 | <Tool | 32 | <Tool |
33 | Name="VCXMLDataGeneratorTool" | 33 | Name="VCXMLDataGeneratorTool" |
34 | /> | 34 | /> |
35 | <Tool | 35 | <Tool |
36 | Name="VCWebServiceProxyGeneratorTool" | 36 | Name="VCWebServiceProxyGeneratorTool" |
37 | /> | 37 | /> |
38 | <Tool | 38 | <Tool |
39 | Name="VCMIDLTool" | 39 | Name="VCMIDLTool" |
40 | /> | 40 | /> |
41 | <Tool | 41 | <Tool |
42 | Name="VCCLCompilerTool" | 42 | Name="VCCLCompilerTool" |
43 | Optimization="0" | 43 | Optimization="0" |
44 | AdditionalIncludeDirectories="../../../include" | 44 | AdditionalIncludeDirectories="../../../include" |
45 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 45 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
46 | MinimalRebuild="true" | 46 | MinimalRebuild="true" |
47 | BasicRuntimeChecks="3" | 47 | BasicRuntimeChecks="3" |
48 | RuntimeLibrary="1" | 48 | RuntimeLibrary="1" |
49 | UsePrecompiledHeader="0" | 49 | UsePrecompiledHeader="0" |
50 | WarningLevel="3" | 50 | WarningLevel="3" |
51 | DebugInformationFormat="4" | 51 | DebugInformationFormat="4" |
52 | /> | 52 | /> |
53 | <Tool | 53 | <Tool |
54 | Name="VCManagedResourceCompilerTool" | 54 | Name="VCManagedResourceCompilerTool" |
55 | /> | 55 | /> |
56 | <Tool | 56 | <Tool |
57 | Name="VCResourceCompilerTool" | 57 | Name="VCResourceCompilerTool" |
58 | /> | 58 | /> |
59 | <Tool | 59 | <Tool |
60 | Name="VCPreLinkEventTool" | 60 | Name="VCPreLinkEventTool" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCLinkerTool" | 63 | Name="VCLinkerTool" |
64 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" | 64 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" |
65 | OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" | 65 | OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" |
66 | LinkIncremental="2" | 66 | LinkIncremental="2" |
67 | AdditionalLibraryDirectories="../../../lib/Win32-visualstudio" | 67 | AdditionalLibraryDirectories="../../../lib/Win32-visualstudio" |
68 | GenerateDebugInformation="true" | 68 | GenerateDebugInformation="true" |
69 | ProgramDatabaseFile="$(OutDir)/TestProject.pdb" | 69 | ProgramDatabaseFile="$(OutDir)/TestProject.pdb" |
70 | SubSystem="1" | 70 | SubSystem="1" |
71 | RandomizedBaseAddress="1" | 71 | RandomizedBaseAddress="1" |
72 | DataExecutionPrevention="0" | 72 | DataExecutionPrevention="0" |
73 | TargetMachine="1" | 73 | TargetMachine="1" |
74 | /> | 74 | /> |
75 | <Tool | 75 | <Tool |
76 | Name="VCALinkTool" | 76 | Name="VCALinkTool" |
77 | /> | 77 | /> |
78 | <Tool | 78 | <Tool |
79 | Name="VCManifestTool" | 79 | Name="VCManifestTool" |
80 | /> | 80 | /> |
81 | <Tool | 81 | <Tool |
82 | Name="VCXDCMakeTool" | 82 | Name="VCXDCMakeTool" |
83 | /> | 83 | /> |
84 | <Tool | 84 | <Tool |
85 | Name="VCBscMakeTool" | 85 | Name="VCBscMakeTool" |
86 | /> | 86 | /> |
87 | <Tool | 87 | <Tool |
88 | Name="VCFxCopTool" | 88 | Name="VCFxCopTool" |
89 | /> | 89 | /> |
90 | <Tool | 90 | <Tool |
91 | Name="VCAppVerifierTool" | 91 | Name="VCAppVerifierTool" |
92 | /> | 92 | /> |
93 | <Tool | 93 | <Tool |
94 | Name="VCPostBuildEventTool" | 94 | Name="VCPostBuildEventTool" |
95 | /> | 95 | /> |
96 | </Configuration> | 96 | </Configuration> |
97 | <Configuration | 97 | <Configuration |
98 | Name="Release|Win32" | 98 | Name="Release|Win32" |
99 | OutputDirectory="Release" | 99 | OutputDirectory="Release" |
100 | IntermediateDirectory="Release" | 100 | IntermediateDirectory="Release" |
101 | ConfigurationType="1" | 101 | ConfigurationType="1" |
102 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 102 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
103 | CharacterSet="2" | 103 | CharacterSet="2" |
104 | WholeProgramOptimization="1" | 104 | WholeProgramOptimization="1" |
105 | > | 105 | > |
106 | <Tool | 106 | <Tool |
107 | Name="VCPreBuildEventTool" | 107 | Name="VCPreBuildEventTool" |
108 | /> | 108 | /> |
109 | <Tool | 109 | <Tool |
110 | Name="VCCustomBuildTool" | 110 | Name="VCCustomBuildTool" |
111 | /> | 111 | /> |
112 | <Tool | 112 | <Tool |
113 | Name="VCXMLDataGeneratorTool" | 113 | Name="VCXMLDataGeneratorTool" |
114 | /> | 114 | /> |
115 | <Tool | 115 | <Tool |
116 | Name="VCWebServiceProxyGeneratorTool" | 116 | Name="VCWebServiceProxyGeneratorTool" |
117 | /> | 117 | /> |
118 | <Tool | 118 | <Tool |
119 | Name="VCMIDLTool" | 119 | Name="VCMIDLTool" |
120 | /> | 120 | /> |
121 | <Tool | 121 | <Tool |
122 | Name="VCCLCompilerTool" | 122 | Name="VCCLCompilerTool" |
123 | Optimization="2" | 123 | Optimization="2" |
124 | WholeProgramOptimization="false" | 124 | WholeProgramOptimization="false" |
125 | AdditionalIncludeDirectories="../../../include" | 125 | AdditionalIncludeDirectories="../../../include" |
126 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 126 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
127 | MinimalRebuild="true" | 127 | MinimalRebuild="true" |
128 | RuntimeLibrary="0" | 128 | RuntimeLibrary="0" |
129 | UsePrecompiledHeader="0" | 129 | UsePrecompiledHeader="0" |
130 | WarningLevel="3" | 130 | WarningLevel="3" |
131 | DebugInformationFormat="3" | 131 | DebugInformationFormat="3" |
132 | /> | 132 | /> |
133 | <Tool | 133 | <Tool |
134 | Name="VCManagedResourceCompilerTool" | 134 | Name="VCManagedResourceCompilerTool" |
135 | /> | 135 | /> |
136 | <Tool | 136 | <Tool |
137 | Name="VCResourceCompilerTool" | 137 | Name="VCResourceCompilerTool" |
138 | /> | 138 | /> |
139 | <Tool | 139 | <Tool |
140 | Name="VCPreLinkEventTool" | 140 | Name="VCPreLinkEventTool" |
141 | /> | 141 | /> |
142 | <Tool | 142 | <Tool |
143 | Name="VCLinkerTool" | 143 | Name="VCLinkerTool" |
144 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" | 144 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib" |
145 | OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" | 145 | OutputFile="../../../bin/Win32-visualstudio/FontTool.exe" |
146 | LinkIncremental="0" | 146 | LinkIncremental="0" |
147 | AdditionalLibraryDirectories="../../../lib/Win32-visualstudio" | 147 | AdditionalLibraryDirectories="../../../lib/Win32-visualstudio" |
148 | GenerateDebugInformation="false" | 148 | GenerateDebugInformation="false" |
149 | SubSystem="1" | 149 | SubSystem="1" |
150 | OptimizeReferences="2" | 150 | OptimizeReferences="2" |
151 | EnableCOMDATFolding="2" | 151 | EnableCOMDATFolding="2" |
152 | LinkTimeCodeGeneration="0" | 152 | LinkTimeCodeGeneration="0" |
153 | RandomizedBaseAddress="1" | 153 | RandomizedBaseAddress="1" |
154 | DataExecutionPrevention="0" | 154 | DataExecutionPrevention="0" |
155 | TargetMachine="1" | 155 | TargetMachine="1" |
156 | /> | 156 | /> |
157 | <Tool | 157 | <Tool |
158 | Name="VCALinkTool" | 158 | Name="VCALinkTool" |
159 | /> | 159 | /> |
160 | <Tool | 160 | <Tool |
161 | Name="VCManifestTool" | 161 | Name="VCManifestTool" |
162 | /> | 162 | /> |
163 | <Tool | 163 | <Tool |
164 | Name="VCXDCMakeTool" | 164 | Name="VCXDCMakeTool" |
165 | /> | 165 | /> |
166 | <Tool | 166 | <Tool |
167 | Name="VCBscMakeTool" | 167 | Name="VCBscMakeTool" |
168 | /> | 168 | /> |
169 | <Tool | 169 | <Tool |
170 | Name="VCFxCopTool" | 170 | Name="VCFxCopTool" |
171 | /> | 171 | /> |
172 | <Tool | 172 | <Tool |
173 | Name="VCAppVerifierTool" | 173 | Name="VCAppVerifierTool" |
174 | /> | 174 | /> |
175 | <Tool | 175 | <Tool |
176 | Name="VCPostBuildEventTool" | 176 | Name="VCPostBuildEventTool" |
177 | /> | 177 | /> |
178 | </Configuration> | 178 | </Configuration> |
179 | </Configurations> | 179 | </Configurations> |
180 | <References> | 180 | <References> |
181 | </References> | 181 | </References> |
182 | <Files> | 182 | <Files> |
183 | <File | 183 | <File |
184 | RelativePath=".\CFontTool.cpp" | 184 | RelativePath=".\CFontTool.cpp" |
185 | > | 185 | > |
186 | </File> | 186 | </File> |
187 | <File | 187 | <File |
188 | RelativePath=".\CFontTool.h" | 188 | RelativePath=".\CFontTool.h" |
189 | > | 189 | > |
190 | </File> | 190 | </File> |
191 | <File | 191 | <File |
192 | RelativePath=".\CVectorFontTool.h" | 192 | RelativePath=".\CVectorFontTool.h" |
193 | > | 193 | > |
194 | </File> | 194 | </File> |
195 | <File | 195 | <File |
196 | RelativePath=".\main.cpp" | 196 | RelativePath=".\main.cpp" |
197 | > | 197 | > |
198 | </File> | 198 | </File> |
199 | </Files> | 199 | </Files> |
200 | <Globals> | 200 | <Globals> |
201 | </Globals> | 201 | </Globals> |
202 | </VisualStudioProject> | 202 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln index 48651a8..55fc6c7 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.sln | |||
@@ -1,20 +1,20 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 11.00 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 |
3 | # Visual Studio 2010 | 3 | # Visual Studio 2010 |
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_vc10.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_vc10.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" |
5 | EndProject | 5 | EndProject |
6 | Global | 6 | Global |
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
8 | Debug|Win32 = Debug|Win32 | 8 | Debug|Win32 = Debug|Win32 |
9 | Release|Win32 = Release|Win32 | 9 | Release|Win32 = Release|Win32 |
10 | EndGlobalSection | 10 | EndGlobalSection |
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
12 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 | 12 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 |
13 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 | 13 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 |
14 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 | 14 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 |
15 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 | 15 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 |
16 | EndGlobalSection | 16 | EndGlobalSection |
17 | GlobalSection(SolutionProperties) = preSolution | 17 | GlobalSection(SolutionProperties) = preSolution |
18 | HideSolutionNode = FALSE | 18 | HideSolutionNode = FALSE |
19 | EndGlobalSection | 19 | EndGlobalSection |
20 | EndGlobal | 20 | EndGlobal |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj index e1ee889..fc54796 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc10.vcxproj | |||
@@ -1,203 +1,203 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectName>FontTool</ProjectName> | 22 | <ProjectName>FontTool</ProjectName> |
23 | <ProjectGuid>{4D53E40F-37E3-42B1-8848-F4C6F8313A17}</ProjectGuid> | 23 | <ProjectGuid>{4D53E40F-37E3-42B1-8848-F4C6F8313A17}</ProjectGuid> |
24 | <Keyword>Win32Proj</Keyword> | 24 | <Keyword>Win32Proj</Keyword> |
25 | </PropertyGroup> | 25 | </PropertyGroup> |
26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
28 | <ConfigurationType>Application</ConfigurationType> | 28 | <ConfigurationType>Application</ConfigurationType> |
29 | <CharacterSet>MultiByte</CharacterSet> | 29 | <CharacterSet>MultiByte</CharacterSet> |
30 | <WholeProgramOptimization>true</WholeProgramOptimization> | 30 | <WholeProgramOptimization>true</WholeProgramOptimization> |
31 | </PropertyGroup> | 31 | </PropertyGroup> |
32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
33 | <ConfigurationType>Application</ConfigurationType> | 33 | <ConfigurationType>Application</ConfigurationType> |
34 | <CharacterSet>MultiByte</CharacterSet> | 34 | <CharacterSet>MultiByte</CharacterSet> |
35 | <WholeProgramOptimization>true</WholeProgramOptimization> | 35 | <WholeProgramOptimization>true</WholeProgramOptimization> |
36 | </PropertyGroup> | 36 | </PropertyGroup> |
37 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 37 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
38 | <ConfigurationType>Application</ConfigurationType> | 38 | <ConfigurationType>Application</ConfigurationType> |
39 | <CharacterSet>MultiByte</CharacterSet> | 39 | <CharacterSet>MultiByte</CharacterSet> |
40 | </PropertyGroup> | 40 | </PropertyGroup> |
41 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 41 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
42 | <ConfigurationType>Application</ConfigurationType> | 42 | <ConfigurationType>Application</ConfigurationType> |
43 | <CharacterSet>MultiByte</CharacterSet> | 43 | <CharacterSet>MultiByte</CharacterSet> |
44 | </PropertyGroup> | 44 | </PropertyGroup> |
45 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 45 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
46 | <ImportGroup Label="ExtensionSettings"> | 46 | <ImportGroup Label="ExtensionSettings"> |
47 | </ImportGroup> | 47 | </ImportGroup> |
48 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 48 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
49 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 49 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
50 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 50 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
51 | </ImportGroup> | 51 | </ImportGroup> |
52 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 52 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
53 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 53 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
54 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 54 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
55 | </ImportGroup> | 55 | </ImportGroup> |
56 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 56 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
57 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 57 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
58 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 58 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
59 | </ImportGroup> | 59 | </ImportGroup> |
60 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 60 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
61 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 61 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
62 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 62 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
63 | </ImportGroup> | 63 | </ImportGroup> |
64 | <PropertyGroup Label="UserMacros" /> | 64 | <PropertyGroup Label="UserMacros" /> |
65 | <PropertyGroup> | 65 | <PropertyGroup> |
66 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 66 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> | 67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> |
68 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> | 68 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> |
69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | 69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
70 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | 70 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> |
72 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> | 72 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> |
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
74 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 74 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
76 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 76 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
78 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 78 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
80 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 80 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
82 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 82 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
84 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 84 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
86 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 86 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
87 | </PropertyGroup> | 87 | </PropertyGroup> |
88 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 88 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
89 | <ClCompile> | 89 | <ClCompile> |
90 | <Optimization>Disabled</Optimization> | 90 | <Optimization>Disabled</Optimization> |
91 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 91 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
92 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 92 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
93 | <MinimalRebuild>true</MinimalRebuild> | 93 | <MinimalRebuild>true</MinimalRebuild> |
94 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 94 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
95 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 95 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
96 | <PrecompiledHeader> | 96 | <PrecompiledHeader> |
97 | </PrecompiledHeader> | 97 | </PrecompiledHeader> |
98 | <WarningLevel>Level3</WarningLevel> | 98 | <WarningLevel>Level3</WarningLevel> |
99 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 99 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
100 | </ClCompile> | 100 | </ClCompile> |
101 | <Link> | 101 | <Link> |
102 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 102 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
103 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> | 103 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> |
104 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 104 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
105 | <GenerateDebugInformation>true</GenerateDebugInformation> | 105 | <GenerateDebugInformation>true</GenerateDebugInformation> |
106 | <SubSystem>Console</SubSystem> | 106 | <SubSystem>Console</SubSystem> |
107 | <DataExecutionPrevention> | 107 | <DataExecutionPrevention> |
108 | </DataExecutionPrevention> | 108 | </DataExecutionPrevention> |
109 | </Link> | 109 | </Link> |
110 | </ItemDefinitionGroup> | 110 | </ItemDefinitionGroup> |
111 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 111 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
112 | <ClCompile> | 112 | <ClCompile> |
113 | <Optimization>Disabled</Optimization> | 113 | <Optimization>Disabled</Optimization> |
114 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 114 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
115 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 115 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
116 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 116 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
117 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 117 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
118 | <PrecompiledHeader> | 118 | <PrecompiledHeader> |
119 | </PrecompiledHeader> | 119 | </PrecompiledHeader> |
120 | <WarningLevel>Level3</WarningLevel> | 120 | <WarningLevel>Level3</WarningLevel> |
121 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 121 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
122 | </ClCompile> | 122 | </ClCompile> |
123 | <Link> | 123 | <Link> |
124 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 124 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
125 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> | 125 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> |
126 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 126 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
127 | <GenerateDebugInformation>true</GenerateDebugInformation> | 127 | <GenerateDebugInformation>true</GenerateDebugInformation> |
128 | <SubSystem>Console</SubSystem> | 128 | <SubSystem>Console</SubSystem> |
129 | <DataExecutionPrevention> | 129 | <DataExecutionPrevention> |
130 | </DataExecutionPrevention> | 130 | </DataExecutionPrevention> |
131 | </Link> | 131 | </Link> |
132 | </ItemDefinitionGroup> | 132 | </ItemDefinitionGroup> |
133 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 133 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
134 | <ClCompile> | 134 | <ClCompile> |
135 | <Optimization>MaxSpeed</Optimization> | 135 | <Optimization>MaxSpeed</Optimization> |
136 | <WholeProgramOptimization>false</WholeProgramOptimization> | 136 | <WholeProgramOptimization>false</WholeProgramOptimization> |
137 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 137 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
138 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 138 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
139 | <MinimalRebuild>true</MinimalRebuild> | 139 | <MinimalRebuild>true</MinimalRebuild> |
140 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 140 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
141 | <PrecompiledHeader> | 141 | <PrecompiledHeader> |
142 | </PrecompiledHeader> | 142 | </PrecompiledHeader> |
143 | <WarningLevel>Level3</WarningLevel> | 143 | <WarningLevel>Level3</WarningLevel> |
144 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 144 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
145 | </ClCompile> | 145 | </ClCompile> |
146 | <Link> | 146 | <Link> |
147 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 147 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
148 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> | 148 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> |
149 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 149 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
150 | <GenerateDebugInformation>false</GenerateDebugInformation> | 150 | <GenerateDebugInformation>false</GenerateDebugInformation> |
151 | <SubSystem>Console</SubSystem> | 151 | <SubSystem>Console</SubSystem> |
152 | <OptimizeReferences>true</OptimizeReferences> | 152 | <OptimizeReferences>true</OptimizeReferences> |
153 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 153 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
154 | <LinkTimeCodeGeneration> | 154 | <LinkTimeCodeGeneration> |
155 | </LinkTimeCodeGeneration> | 155 | </LinkTimeCodeGeneration> |
156 | <DataExecutionPrevention> | 156 | <DataExecutionPrevention> |
157 | </DataExecutionPrevention> | 157 | </DataExecutionPrevention> |
158 | </Link> | 158 | </Link> |
159 | </ItemDefinitionGroup> | 159 | </ItemDefinitionGroup> |
160 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 160 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
161 | <ClCompile> | 161 | <ClCompile> |
162 | <Optimization>MaxSpeed</Optimization> | 162 | <Optimization>MaxSpeed</Optimization> |
163 | <WholeProgramOptimization>false</WholeProgramOptimization> | 163 | <WholeProgramOptimization>false</WholeProgramOptimization> |
164 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 164 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
165 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 165 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
166 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 166 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
167 | <PrecompiledHeader> | 167 | <PrecompiledHeader> |
168 | </PrecompiledHeader> | 168 | </PrecompiledHeader> |
169 | <WarningLevel>Level3</WarningLevel> | 169 | <WarningLevel>Level3</WarningLevel> |
170 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 170 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
171 | </ClCompile> | 171 | </ClCompile> |
172 | <Link> | 172 | <Link> |
173 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 173 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
174 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> | 174 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> |
175 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 175 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
176 | <GenerateDebugInformation>false</GenerateDebugInformation> | 176 | <GenerateDebugInformation>false</GenerateDebugInformation> |
177 | <SubSystem>Console</SubSystem> | 177 | <SubSystem>Console</SubSystem> |
178 | <OptimizeReferences>true</OptimizeReferences> | 178 | <OptimizeReferences>true</OptimizeReferences> |
179 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 179 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
180 | <LinkTimeCodeGeneration> | 180 | <LinkTimeCodeGeneration> |
181 | </LinkTimeCodeGeneration> | 181 | </LinkTimeCodeGeneration> |
182 | <DataExecutionPrevention> | 182 | <DataExecutionPrevention> |
183 | </DataExecutionPrevention> | 183 | </DataExecutionPrevention> |
184 | </Link> | 184 | </Link> |
185 | </ItemDefinitionGroup> | 185 | </ItemDefinitionGroup> |
186 | <ItemGroup> | 186 | <ItemGroup> |
187 | <ClCompile Include="CFontTool.cpp" /> | 187 | <ClCompile Include="CFontTool.cpp" /> |
188 | <ClCompile Include="main.cpp" /> | 188 | <ClCompile Include="main.cpp" /> |
189 | </ItemGroup> | 189 | </ItemGroup> |
190 | <ItemGroup> | 190 | <ItemGroup> |
191 | <ClInclude Include="CFontTool.h" /> | 191 | <ClInclude Include="CFontTool.h" /> |
192 | <ClInclude Include="CVectorFontTool.h" /> | 192 | <ClInclude Include="CVectorFontTool.h" /> |
193 | </ItemGroup> | 193 | </ItemGroup> |
194 | <ItemGroup> | 194 | <ItemGroup> |
195 | <ProjectReference Include="..\..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> | 195 | <ProjectReference Include="..\..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> |
196 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> | 196 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> |
197 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | 197 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
198 | </ProjectReference> | 198 | </ProjectReference> |
199 | </ItemGroup> | 199 | </ItemGroup> |
200 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 200 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
201 | <ImportGroup Label="ExtensionTargets"> | 201 | <ImportGroup Label="ExtensionTargets"> |
202 | </ImportGroup> | 202 | </ImportGroup> |
203 | </Project> \ No newline at end of file | 203 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln index 05b60ad..60f8d08 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.sln | |||
@@ -1,20 +1,20 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 11.00 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 |
3 | # Visual Studio 2012 | 3 | # Visual Studio 2012 |
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_vc11.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "irrFontTool_vc11.vcxproj", "{4D53E40F-37E3-42B1-8848-F4C6F8313A17}" |
5 | EndProject | 5 | EndProject |
6 | Global | 6 | Global |
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
8 | Debug|Win32 = Debug|Win32 | 8 | Debug|Win32 = Debug|Win32 |
9 | Release|Win32 = Release|Win32 | 9 | Release|Win32 = Release|Win32 |
10 | EndGlobalSection | 10 | EndGlobalSection |
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution | 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
12 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 | 12 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.ActiveCfg = Debug|Win32 |
13 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 | 13 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Debug|Win32.Build.0 = Debug|Win32 |
14 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 | 14 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.ActiveCfg = Release|Win32 |
15 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 | 15 | {4D53E40F-37E3-42B1-8848-F4C6F8313A17}.Release|Win32.Build.0 = Release|Win32 |
16 | EndGlobalSection | 16 | EndGlobalSection |
17 | GlobalSection(SolutionProperties) = preSolution | 17 | GlobalSection(SolutionProperties) = preSolution |
18 | HideSolutionNode = FALSE | 18 | HideSolutionNode = FALSE |
19 | EndGlobalSection | 19 | EndGlobalSection |
20 | EndGlobal | 20 | EndGlobal |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj index 4513cfa..ddae5b1 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/irrFontTool_vc11.vcxproj | |||
@@ -1,207 +1,207 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectName>FontTool</ProjectName> | 22 | <ProjectName>FontTool</ProjectName> |
23 | <ProjectGuid>{4D53E40F-37E3-42B1-8848-F4C6F8313A17}</ProjectGuid> | 23 | <ProjectGuid>{4D53E40F-37E3-42B1-8848-F4C6F8313A17}</ProjectGuid> |
24 | <Keyword>Win32Proj</Keyword> | 24 | <Keyword>Win32Proj</Keyword> |
25 | </PropertyGroup> | 25 | </PropertyGroup> |
26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 26 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 27 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
28 | <ConfigurationType>Application</ConfigurationType> | 28 | <ConfigurationType>Application</ConfigurationType> |
29 | <CharacterSet>MultiByte</CharacterSet> | 29 | <CharacterSet>MultiByte</CharacterSet> |
30 | <WholeProgramOptimization>true</WholeProgramOptimization> | 30 | <WholeProgramOptimization>true</WholeProgramOptimization> |
31 | <PlatformToolset>v110</PlatformToolset> | 31 | <PlatformToolset>v110</PlatformToolset> |
32 | </PropertyGroup> | 32 | </PropertyGroup> |
33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
34 | <ConfigurationType>Application</ConfigurationType> | 34 | <ConfigurationType>Application</ConfigurationType> |
35 | <CharacterSet>MultiByte</CharacterSet> | 35 | <CharacterSet>MultiByte</CharacterSet> |
36 | <WholeProgramOptimization>true</WholeProgramOptimization> | 36 | <WholeProgramOptimization>true</WholeProgramOptimization> |
37 | <PlatformToolset>v110</PlatformToolset> | 37 | <PlatformToolset>v110</PlatformToolset> |
38 | </PropertyGroup> | 38 | </PropertyGroup> |
39 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 39 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
40 | <ConfigurationType>Application</ConfigurationType> | 40 | <ConfigurationType>Application</ConfigurationType> |
41 | <CharacterSet>MultiByte</CharacterSet> | 41 | <CharacterSet>MultiByte</CharacterSet> |
42 | <PlatformToolset>v110</PlatformToolset> | 42 | <PlatformToolset>v110</PlatformToolset> |
43 | </PropertyGroup> | 43 | </PropertyGroup> |
44 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 44 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
45 | <ConfigurationType>Application</ConfigurationType> | 45 | <ConfigurationType>Application</ConfigurationType> |
46 | <CharacterSet>MultiByte</CharacterSet> | 46 | <CharacterSet>MultiByte</CharacterSet> |
47 | <PlatformToolset>v110</PlatformToolset> | 47 | <PlatformToolset>v110</PlatformToolset> |
48 | </PropertyGroup> | 48 | </PropertyGroup> |
49 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 49 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
50 | <ImportGroup Label="ExtensionSettings"> | 50 | <ImportGroup Label="ExtensionSettings"> |
51 | </ImportGroup> | 51 | </ImportGroup> |
52 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 52 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
53 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 53 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
54 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 54 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
55 | </ImportGroup> | 55 | </ImportGroup> |
56 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 56 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
57 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 57 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
58 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 58 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
59 | </ImportGroup> | 59 | </ImportGroup> |
60 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 60 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
61 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 61 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
62 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 62 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
63 | </ImportGroup> | 63 | </ImportGroup> |
64 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 64 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
65 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 65 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
66 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 66 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
67 | </ImportGroup> | 67 | </ImportGroup> |
68 | <PropertyGroup Label="UserMacros" /> | 68 | <PropertyGroup Label="UserMacros" /> |
69 | <PropertyGroup> | 69 | <PropertyGroup> |
70 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 70 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> |
72 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> | 72 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> |
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | 73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
74 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | 74 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> | 75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\Win32-VisualStudio\</OutDir> |
76 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> | 76 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\Win64-VisualStudio\</OutDir> |
77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
78 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 78 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
86 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 86 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
88 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 88 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
90 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 90 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
91 | </PropertyGroup> | 91 | </PropertyGroup> |
92 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 92 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
93 | <ClCompile> | 93 | <ClCompile> |
94 | <Optimization>Disabled</Optimization> | 94 | <Optimization>Disabled</Optimization> |
95 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 95 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
96 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 96 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
97 | <MinimalRebuild>true</MinimalRebuild> | 97 | <MinimalRebuild>true</MinimalRebuild> |
98 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 98 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
99 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 99 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
100 | <PrecompiledHeader> | 100 | <PrecompiledHeader> |
101 | </PrecompiledHeader> | 101 | </PrecompiledHeader> |
102 | <WarningLevel>Level3</WarningLevel> | 102 | <WarningLevel>Level3</WarningLevel> |
103 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 103 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
104 | </ClCompile> | 104 | </ClCompile> |
105 | <Link> | 105 | <Link> |
106 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 106 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
107 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> | 107 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> |
108 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 108 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
109 | <GenerateDebugInformation>true</GenerateDebugInformation> | 109 | <GenerateDebugInformation>true</GenerateDebugInformation> |
110 | <SubSystem>Console</SubSystem> | 110 | <SubSystem>Console</SubSystem> |
111 | <DataExecutionPrevention> | 111 | <DataExecutionPrevention> |
112 | </DataExecutionPrevention> | 112 | </DataExecutionPrevention> |
113 | </Link> | 113 | </Link> |
114 | </ItemDefinitionGroup> | 114 | </ItemDefinitionGroup> |
115 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 115 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
116 | <ClCompile> | 116 | <ClCompile> |
117 | <Optimization>Disabled</Optimization> | 117 | <Optimization>Disabled</Optimization> |
118 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 118 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
119 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 119 | <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
120 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 120 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
121 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 121 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
122 | <PrecompiledHeader> | 122 | <PrecompiledHeader> |
123 | </PrecompiledHeader> | 123 | </PrecompiledHeader> |
124 | <WarningLevel>Level3</WarningLevel> | 124 | <WarningLevel>Level3</WarningLevel> |
125 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 125 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
126 | </ClCompile> | 126 | </ClCompile> |
127 | <Link> | 127 | <Link> |
128 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 128 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
129 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> | 129 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> |
130 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 130 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
131 | <GenerateDebugInformation>true</GenerateDebugInformation> | 131 | <GenerateDebugInformation>true</GenerateDebugInformation> |
132 | <SubSystem>Console</SubSystem> | 132 | <SubSystem>Console</SubSystem> |
133 | <DataExecutionPrevention> | 133 | <DataExecutionPrevention> |
134 | </DataExecutionPrevention> | 134 | </DataExecutionPrevention> |
135 | </Link> | 135 | </Link> |
136 | </ItemDefinitionGroup> | 136 | </ItemDefinitionGroup> |
137 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 137 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
138 | <ClCompile> | 138 | <ClCompile> |
139 | <Optimization>MaxSpeed</Optimization> | 139 | <Optimization>MaxSpeed</Optimization> |
140 | <WholeProgramOptimization>false</WholeProgramOptimization> | 140 | <WholeProgramOptimization>false</WholeProgramOptimization> |
141 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 141 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
142 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 142 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
143 | <MinimalRebuild>true</MinimalRebuild> | 143 | <MinimalRebuild>true</MinimalRebuild> |
144 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 144 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
145 | <PrecompiledHeader> | 145 | <PrecompiledHeader> |
146 | </PrecompiledHeader> | 146 | </PrecompiledHeader> |
147 | <WarningLevel>Level3</WarningLevel> | 147 | <WarningLevel>Level3</WarningLevel> |
148 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 148 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
149 | </ClCompile> | 149 | </ClCompile> |
150 | <Link> | 150 | <Link> |
151 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 151 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
152 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> | 152 | <OutputFile>../../../bin/Win32-visualstudio/FontTool.exe</OutputFile> |
153 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 153 | <AdditionalLibraryDirectories>../../../lib/Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
154 | <GenerateDebugInformation>false</GenerateDebugInformation> | 154 | <GenerateDebugInformation>false</GenerateDebugInformation> |
155 | <SubSystem>Console</SubSystem> | 155 | <SubSystem>Console</SubSystem> |
156 | <OptimizeReferences>true</OptimizeReferences> | 156 | <OptimizeReferences>true</OptimizeReferences> |
157 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 157 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
158 | <LinkTimeCodeGeneration> | 158 | <LinkTimeCodeGeneration> |
159 | </LinkTimeCodeGeneration> | 159 | </LinkTimeCodeGeneration> |
160 | <DataExecutionPrevention> | 160 | <DataExecutionPrevention> |
161 | </DataExecutionPrevention> | 161 | </DataExecutionPrevention> |
162 | </Link> | 162 | </Link> |
163 | </ItemDefinitionGroup> | 163 | </ItemDefinitionGroup> |
164 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 164 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
165 | <ClCompile> | 165 | <ClCompile> |
166 | <Optimization>MaxSpeed</Optimization> | 166 | <Optimization>MaxSpeed</Optimization> |
167 | <WholeProgramOptimization>false</WholeProgramOptimization> | 167 | <WholeProgramOptimization>false</WholeProgramOptimization> |
168 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 168 | <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
169 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 169 | <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
170 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 170 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
171 | <PrecompiledHeader> | 171 | <PrecompiledHeader> |
172 | </PrecompiledHeader> | 172 | </PrecompiledHeader> |
173 | <WarningLevel>Level3</WarningLevel> | 173 | <WarningLevel>Level3</WarningLevel> |
174 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 174 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
175 | </ClCompile> | 175 | </ClCompile> |
176 | <Link> | 176 | <Link> |
177 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> | 177 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib gdi32.lib %(AdditionalOptions)</AdditionalOptions> |
178 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> | 178 | <OutputFile>../../../bin/Win64-visualstudio/FontTool.exe</OutputFile> |
179 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 179 | <AdditionalLibraryDirectories>../../../lib/Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
180 | <GenerateDebugInformation>false</GenerateDebugInformation> | 180 | <GenerateDebugInformation>false</GenerateDebugInformation> |
181 | <SubSystem>Console</SubSystem> | 181 | <SubSystem>Console</SubSystem> |
182 | <OptimizeReferences>true</OptimizeReferences> | 182 | <OptimizeReferences>true</OptimizeReferences> |
183 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 183 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
184 | <LinkTimeCodeGeneration> | 184 | <LinkTimeCodeGeneration> |
185 | </LinkTimeCodeGeneration> | 185 | </LinkTimeCodeGeneration> |
186 | <DataExecutionPrevention> | 186 | <DataExecutionPrevention> |
187 | </DataExecutionPrevention> | 187 | </DataExecutionPrevention> |
188 | </Link> | 188 | </Link> |
189 | </ItemDefinitionGroup> | 189 | </ItemDefinitionGroup> |
190 | <ItemGroup> | 190 | <ItemGroup> |
191 | <ClCompile Include="CFontTool.cpp" /> | 191 | <ClCompile Include="CFontTool.cpp" /> |
192 | <ClCompile Include="main.cpp" /> | 192 | <ClCompile Include="main.cpp" /> |
193 | </ItemGroup> | 193 | </ItemGroup> |
194 | <ItemGroup> | 194 | <ItemGroup> |
195 | <ClInclude Include="CFontTool.h" /> | 195 | <ClInclude Include="CFontTool.h" /> |
196 | <ClInclude Include="CVectorFontTool.h" /> | 196 | <ClInclude Include="CVectorFontTool.h" /> |
197 | </ItemGroup> | 197 | </ItemGroup> |
198 | <ItemGroup> | 198 | <ItemGroup> |
199 | <ProjectReference Include="..\..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> | 199 | <ProjectReference Include="..\..\..\source\Irrlicht\Irrlicht11.0.vcxproj"> |
200 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> | 200 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> |
201 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | 201 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
202 | </ProjectReference> | 202 | </ProjectReference> |
203 | </ItemGroup> | 203 | </ItemGroup> |
204 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 204 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
205 | <ImportGroup Label="ExtensionTargets"> | 205 | <ImportGroup Label="ExtensionTargets"> |
206 | </ImportGroup> | 206 | </ImportGroup> |
207 | </Project> \ No newline at end of file | 207 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/main.cpp b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/main.cpp index 9e9e87f..1170bcc 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/main.cpp +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/newFontTool/main.cpp | |||
@@ -1,493 +1,493 @@ | |||
1 | /* | 1 | /* |
2 | Tool for creating Irrlicht bitmap+vector fonts, | 2 | Tool for creating Irrlicht bitmap+vector fonts, |
3 | started by Gaz Davidson in December 2006 | 3 | started by Gaz Davidson in December 2006 |
4 | 4 | ||
5 | Due to my laziness and Microsoft's unituitive API, surragate pairs and | 5 | Due to my laziness and Microsoft's unituitive API, surragate pairs and |
6 | nonspacing diacritical marks are not supported! | 6 | nonspacing diacritical marks are not supported! |
7 | 7 | ||
8 | Linux bitmap font support added by Neil Burlock Oct 2008 | 8 | Linux bitmap font support added by Neil Burlock Oct 2008 |
9 | Note: Xft/Freetype2 is used to render the fonts under X11. Anti-aliasing | 9 | Note: Xft/Freetype2 is used to render the fonts under X11. Anti-aliasing |
10 | is controlled by the system and cannot be overriden by an application, | 10 | is controlled by the system and cannot be overriden by an application, |
11 | so fonts that are rendered will be aliased or anti-aliased depending | 11 | so fonts that are rendered will be aliased or anti-aliased depending |
12 | on the system that they are created on. | 12 | on the system that they are created on. |
13 | 13 | ||
14 | */ | 14 | */ |
15 | 15 | ||
16 | 16 | ||
17 | #include <irrlicht.h> | 17 | #include <irrlicht.h> |
18 | #include <iostream> | 18 | #include <iostream> |
19 | 19 | ||
20 | #include "CFontTool.h" | 20 | #include "CFontTool.h" |
21 | #include "CVectorFontTool.h" | 21 | #include "CVectorFontTool.h" |
22 | #include "ITexture.h" | 22 | #include "ITexture.h" |
23 | 23 | ||
24 | using namespace irr; | 24 | using namespace irr; |
25 | using namespace gui; | 25 | using namespace gui; |
26 | 26 | ||
27 | #pragma comment(lib, "Irrlicht.lib") | 27 | #pragma comment(lib, "Irrlicht.lib") |
28 | 28 | ||
29 | const s32 texturesizes[] = {128, 256, 512, 1024, 2048, 4096, 0}; | 29 | const s32 texturesizes[] = {128, 256, 512, 1024, 2048, 4096, 0}; |
30 | 30 | ||
31 | const wchar_t *fileformats[] = { L"bmp", L"ppm", 0 }; // bitmap font formats | 31 | const wchar_t *fileformats[] = { L"bmp", L"ppm", 0 }; // bitmap font formats |
32 | const wchar_t *alphafileformats[] = { L"png", L"tga", 0 }; // bitmap font formats which support alpha channels | 32 | const wchar_t *alphafileformats[] = { L"png", L"tga", 0 }; // bitmap font formats which support alpha channels |
33 | const wchar_t *vectorfileformats[] = { L"xml", L"bin", 0 }; // file formats for vector fonts | 33 | const wchar_t *vectorfileformats[] = { L"xml", L"bin", 0 }; // file formats for vector fonts |
34 | 34 | ||
35 | const wchar_t *warntext = L"Legal Notice\n" | 35 | const wchar_t *warntext = L"Legal Notice\n" |
36 | L"------------\n\n" | 36 | L"------------\n\n" |
37 | L"When making bitmap and vector fonts, you should consider the potential legal " | 37 | L"When making bitmap and vector fonts, you should consider the potential legal " |
38 | L"issues with redistributing the fonts with your software; this tool basically " | 38 | L"issues with redistributing the fonts with your software; this tool basically " |
39 | L"copies font data and some authors might not like this!\n" | 39 | L"copies font data and some authors might not like this!\n" |
40 | L"If you purchased fonts or they came with an application or your OS, you'll have" | 40 | L"If you purchased fonts or they came with an application or your OS, you'll have" |
41 | L"to check the license to see what restrictions are placed on making derivative works.\n\n" | 41 | L"to check the license to see what restrictions are placed on making derivative works.\n\n" |
42 | L"PD and the OFL\n" | 42 | L"PD and the OFL\n" |
43 | L"--------------\n\n" | 43 | L"--------------\n\n" |
44 | L"You'll find lots of fonts on the web listed as Public Domain, you can do what you like " | 44 | L"You'll find lots of fonts on the web listed as Public Domain, you can do what you like " |
45 | L"with these.\n" | 45 | L"with these.\n" |
46 | L"Many fonts are released under the Open Font License, which is a 'viral' open source " | 46 | L"Many fonts are released under the Open Font License, which is a 'viral' open source " |
47 | L"license like the GPL. It's worth reading the license here: http://scripts.sil.org/OFL\n" | 47 | L"license like the GPL. It's worth reading the license here: http://scripts.sil.org/OFL\n" |
48 | L"The most important restrictions are- you must include the original font's license, you " | 48 | L"The most important restrictions are- you must include the original font's license, you " |
49 | L"can't stop your users from using or distributing the font, the font must have a " | 49 | L"can't stop your users from using or distributing the font, the font must have a " |
50 | L"different name the original.\n\n" | 50 | L"different name the original.\n\n" |
51 | L"Some free fonts can be found here- www.openfontlibrary.org\n" | 51 | L"Some free fonts can be found here- www.openfontlibrary.org\n" |
52 | L"http://savannah.nongnu.org/projects/freefont/"; | 52 | L"http://savannah.nongnu.org/projects/freefont/"; |
53 | 53 | ||
54 | const wchar_t *helptext = L"This tool creates bitmap fonts for the Irrlicht Engine\n\n" | 54 | const wchar_t *helptext = L"This tool creates bitmap fonts for the Irrlicht Engine\n\n" |
55 | 55 | ||
56 | L"First select a character encoding from the list, then choose the font, " | 56 | L"First select a character encoding from the list, then choose the font, " |
57 | L"size, and whether you'd like bold, italic, antialiasing and an alpha channel. " | 57 | L"size, and whether you'd like bold, italic, antialiasing and an alpha channel. " |
58 | L"In Windows, antialiasing will be ignored for small fonts\n\n" | 58 | L"In Windows, antialiasing will be ignored for small fonts\n\n" |
59 | 59 | ||
60 | L"Then select a texture width and height. If the output exceeds this then more than " | 60 | L"Then select a texture width and height. If the output exceeds this then more than " |
61 | L"one image will be created. You can use the scrollbar at the top of the screen to " | 61 | L"one image will be created. You can use the scrollbar at the top of the screen to " |
62 | L"preview them. Most modern graphics cards will support up to 2048x2048, " | 62 | L"preview them. Most modern graphics cards will support up to 2048x2048, " |
63 | L"keep in mind that more images means worse performance when drawing text!\n\n" | 63 | L"keep in mind that more images means worse performance when drawing text!\n\n" |
64 | 64 | ||
65 | L"If you want a vector font rather than a bitmap font, check the vector box. " | 65 | L"If you want a vector font rather than a bitmap font, check the vector box. " |
66 | L"Vector fonts are stored in system memory while bitmap fonts are in video ram\n\n" | 66 | L"Vector fonts are stored in system memory while bitmap fonts are in video ram\n\n" |
67 | 67 | ||
68 | L"Click create to preview your font, this may take lots of time and memory " | 68 | L"Click create to preview your font, this may take lots of time and memory " |
69 | L"when making a font with a lot of characters, please be patient!\n\n" | 69 | L"when making a font with a lot of characters, please be patient!\n\n" |
70 | 70 | ||
71 | L"Now you're ready to give your font a name, select a format and click save.\n\n" | 71 | L"Now you're ready to give your font a name, select a format and click save.\n\n" |
72 | L"To load your font in Irrlicht, simply use env->getFont(\"Myfont.xml\");\n\n" | 72 | L"To load your font in Irrlicht, simply use env->getFont(\"Myfont.xml\");\n\n" |
73 | 73 | ||
74 | L"That's all, have fun :-)"; | 74 | L"That's all, have fun :-)"; |
75 | 75 | ||
76 | #ifdef _IRR_WINDOWS_ | 76 | #ifdef _IRR_WINDOWS_ |
77 | const wchar_t *completeText = L"Font created"; | 77 | const wchar_t *completeText = L"Font created"; |
78 | #else | 78 | #else |
79 | const wchar_t *completeText = L"Font created\n\n" | 79 | const wchar_t *completeText = L"Font created\n\n" |
80 | L"Please note that anti-aliasing under X11 is controlled by the system " | 80 | L"Please note that anti-aliasing under X11 is controlled by the system " |
81 | L"configuration, so if your system is set to use anti-aliasing, then so " | 81 | L"configuration, so if your system is set to use anti-aliasing, then so " |
82 | L"will any fonts you create with FontTool"; | 82 | L"will any fonts you create with FontTool"; |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | enum MYGUI | 85 | enum MYGUI |
86 | { | 86 | { |
87 | MYGUI_CHARSET = 100, | 87 | MYGUI_CHARSET = 100, |
88 | MYGUI_FONTNAME, | 88 | MYGUI_FONTNAME, |
89 | MYGUI_SIZE, | 89 | MYGUI_SIZE, |
90 | MYGUI_TEXWIDTH, | 90 | MYGUI_TEXWIDTH, |
91 | MYGUI_TEXHEIGHT, | 91 | MYGUI_TEXHEIGHT, |
92 | MYGUI_BOLD, | 92 | MYGUI_BOLD, |
93 | MYGUI_ITALIC, | 93 | MYGUI_ITALIC, |
94 | MYGUI_ANTIALIAS, | 94 | MYGUI_ANTIALIAS, |
95 | MYGUI_ALPHA, | 95 | MYGUI_ALPHA, |
96 | MYGUI_VECTOR, | 96 | MYGUI_VECTOR, |
97 | MYGUI_FILENAME, | 97 | MYGUI_FILENAME, |
98 | MYGUI_FORMAT, | 98 | MYGUI_FORMAT, |
99 | MYGUI_CREATE, | 99 | MYGUI_CREATE, |
100 | MYGUI_SAVE, | 100 | MYGUI_SAVE, |
101 | MYGUI_IMAGE, | 101 | MYGUI_IMAGE, |
102 | MYGUI_CURRENTIMAGE, | 102 | MYGUI_CURRENTIMAGE, |
103 | MYGUI_HELPBUTTON | 103 | MYGUI_HELPBUTTON |
104 | }; | 104 | }; |
105 | 105 | ||
106 | 106 | ||
107 | // event reciever | 107 | // event reciever |
108 | class MyEventReceiver : public IEventReceiver | 108 | class MyEventReceiver : public IEventReceiver |
109 | { | 109 | { |
110 | public: | 110 | public: |
111 | 111 | ||
112 | MyEventReceiver(IrrlichtDevice* device, CFontTool*& fonttool, CVectorFontTool* &vectool) : | 112 | MyEventReceiver(IrrlichtDevice* device, CFontTool*& fonttool, CVectorFontTool* &vectool) : |
113 | Device(device), FontTool(fonttool), VecTool(vectool) | 113 | Device(device), FontTool(fonttool), VecTool(vectool) |
114 | { | 114 | { |
115 | device->setEventReceiver(this); | 115 | device->setEventReceiver(this); |
116 | } | 116 | } |
117 | 117 | ||
118 | virtual bool OnEvent(const SEvent &event) | 118 | virtual bool OnEvent(const SEvent &event) |
119 | { | 119 | { |
120 | if (event.EventType == EET_GUI_EVENT) | 120 | if (event.EventType == EET_GUI_EVENT) |
121 | { | 121 | { |
122 | s32 id = event.GUIEvent.Caller->getID(); | 122 | s32 id = event.GUIEvent.Caller->getID(); |
123 | IGUIEnvironment* env = Device->getGUIEnvironment(); | 123 | IGUIEnvironment* env = Device->getGUIEnvironment(); |
124 | 124 | ||
125 | switch(event.GUIEvent.EventType) | 125 | switch(event.GUIEvent.EventType) |
126 | { | 126 | { |
127 | case EGET_SCROLL_BAR_CHANGED: | 127 | case EGET_SCROLL_BAR_CHANGED: |
128 | if (id == MYGUI_CURRENTIMAGE) | 128 | if (id == MYGUI_CURRENTIMAGE) |
129 | { | 129 | { |
130 | IGUIImage* img = (IGUIImage*)env->getRootGUIElement()->getElementFromId(MYGUI_IMAGE,true); | 130 | IGUIImage* img = (IGUIImage*)env->getRootGUIElement()->getElementFromId(MYGUI_IMAGE,true); |
131 | s32 i = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); | 131 | s32 i = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos(); |
132 | img->setImage(FontTool->currentTextures[i]); | 132 | img->setImage(FontTool->currentTextures[i]); |
133 | 133 | ||
134 | return true; | 134 | return true; |
135 | } | 135 | } |
136 | break; | 136 | break; |
137 | case EGET_COMBO_BOX_CHANGED: | 137 | case EGET_COMBO_BOX_CHANGED: |
138 | if (id == MYGUI_CHARSET) | 138 | if (id == MYGUI_CHARSET) |
139 | { | 139 | { |
140 | IGUIComboBox* cbo = (IGUIComboBox*)event.GUIEvent.Caller; | 140 | IGUIComboBox* cbo = (IGUIComboBox*)event.GUIEvent.Caller; |
141 | FontTool->selectCharSet(cbo->getSelected()); | 141 | FontTool->selectCharSet(cbo->getSelected()); |
142 | // rebuild font list | 142 | // rebuild font list |
143 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FONTNAME,true); | 143 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FONTNAME,true); |
144 | cbo->clear(); | 144 | cbo->clear(); |
145 | for (u32 i=0; i < FontTool->FontNames.size(); ++i) | 145 | for (u32 i=0; i < FontTool->FontNames.size(); ++i) |
146 | cbo->addItem(FontTool->FontNames[i].c_str()); | 146 | cbo->addItem(FontTool->FontNames[i].c_str()); |
147 | return true; | 147 | return true; |
148 | } | 148 | } |
149 | break; | 149 | break; |
150 | case EGET_CHECKBOX_CHANGED: | 150 | case EGET_CHECKBOX_CHANGED: |
151 | if (id == MYGUI_VECTOR) | 151 | if (id == MYGUI_VECTOR) |
152 | { | 152 | { |
153 | IGUICheckBox* chk = (IGUICheckBox*)event.GUIEvent.Caller; | 153 | IGUICheckBox* chk = (IGUICheckBox*)event.GUIEvent.Caller; |
154 | 154 | ||
155 | IGUIComboBox *cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); | 155 | IGUIComboBox *cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); |
156 | cbo->clear(); | 156 | cbo->clear(); |
157 | 157 | ||
158 | if (chk->isChecked() && VecTool) | 158 | if (chk->isChecked() && VecTool) |
159 | { | 159 | { |
160 | // vector formats | 160 | // vector formats |
161 | for (s32 i=0; fileformats[i] != 0; ++i) | 161 | for (s32 i=0; fileformats[i] != 0; ++i) |
162 | cbo->addItem( core::stringw(vectorfileformats[i]).c_str()); | 162 | cbo->addItem( core::stringw(vectorfileformats[i]).c_str()); |
163 | 163 | ||
164 | } | 164 | } |
165 | else | 165 | else |
166 | { | 166 | { |
167 | 167 | ||
168 | // bitmap formats | 168 | // bitmap formats |
169 | if (!FontTool->UseAlphaChannel) | 169 | if (!FontTool->UseAlphaChannel) |
170 | { | 170 | { |
171 | // add non-alpha formats | 171 | // add non-alpha formats |
172 | for (s32 i=0; fileformats[i] != 0; ++i) | 172 | for (s32 i=0; fileformats[i] != 0; ++i) |
173 | cbo->addItem( core::stringw(fileformats[i]).c_str()); | 173 | cbo->addItem( core::stringw(fileformats[i]).c_str()); |
174 | } | 174 | } |
175 | // add formats which support alpha | 175 | // add formats which support alpha |
176 | for (s32 i=0; alphafileformats[i] != 0; ++i) | 176 | for (s32 i=0; alphafileformats[i] != 0; ++i) |
177 | cbo->addItem( core::stringw(alphafileformats[i]).c_str()); | 177 | cbo->addItem( core::stringw(alphafileformats[i]).c_str()); |
178 | } | 178 | } |
179 | 179 | ||
180 | } | 180 | } |
181 | break; | 181 | break; |
182 | 182 | ||
183 | case EGET_BUTTON_CLICKED: | 183 | case EGET_BUTTON_CLICKED: |
184 | 184 | ||
185 | if (id == MYGUI_CREATE) | 185 | if (id == MYGUI_CREATE) |
186 | { | 186 | { |
187 | // create the font with the params | 187 | // create the font with the params |
188 | IGUIComboBox* cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_CHARSET, true); | 188 | IGUIComboBox* cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_CHARSET, true); |
189 | int charset = cbo->getSelected(); | 189 | int charset = cbo->getSelected(); |
190 | 190 | ||
191 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FONTNAME,true); | 191 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FONTNAME,true); |
192 | int fontname = cbo->getSelected(); | 192 | int fontname = cbo->getSelected(); |
193 | 193 | ||
194 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_SIZE,true); | 194 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_SIZE,true); |
195 | int fontsize = cbo->getSelected(); | 195 | int fontsize = cbo->getSelected(); |
196 | 196 | ||
197 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_TEXWIDTH,true); | 197 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_TEXWIDTH,true); |
198 | int texwidth = cbo->getSelected(); | 198 | int texwidth = cbo->getSelected(); |
199 | 199 | ||
200 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_TEXHEIGHT,true); | 200 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_TEXHEIGHT,true); |
201 | int texheight = cbo->getSelected(); | 201 | int texheight = cbo->getSelected(); |
202 | 202 | ||
203 | IGUICheckBox* chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_BOLD,true); | 203 | IGUICheckBox* chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_BOLD,true); |
204 | bool bold = chk->isChecked(); | 204 | bool bold = chk->isChecked(); |
205 | chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ITALIC,true); | 205 | chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ITALIC,true); |
206 | bool italic = chk->isChecked(); | 206 | bool italic = chk->isChecked(); |
207 | 207 | ||
208 | chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ALPHA,true); | 208 | chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ALPHA,true); |
209 | bool alpha = chk->isChecked(); | 209 | bool alpha = chk->isChecked(); |
210 | 210 | ||
211 | chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ANTIALIAS,true); | 211 | chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_ANTIALIAS,true); |
212 | bool aa = chk->isChecked(); | 212 | bool aa = chk->isChecked(); |
213 | 213 | ||
214 | // vector fonts disabled | 214 | // vector fonts disabled |
215 | //chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_VECTOR,true); | 215 | //chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_VECTOR,true); |
216 | bool vec = false;//chk->isChecked(); | 216 | bool vec = false;//chk->isChecked(); |
217 | 217 | ||
218 | FontTool->makeBitmapFont(fontname, charset, FontTool->FontSizes[fontsize], texturesizes[texwidth], texturesizes[texheight], bold, italic, aa, alpha); | 218 | FontTool->makeBitmapFont(fontname, charset, FontTool->FontSizes[fontsize], texturesizes[texwidth], texturesizes[texheight], bold, italic, aa, alpha); |
219 | 219 | ||
220 | IGUIScrollBar* scrl = (IGUIScrollBar*)env->getRootGUIElement()->getElementFromId(MYGUI_CURRENTIMAGE,true); | 220 | IGUIScrollBar* scrl = (IGUIScrollBar*)env->getRootGUIElement()->getElementFromId(MYGUI_CURRENTIMAGE,true); |
221 | scrl->setMax(FontTool->currentTextures.size() == 0 ? 0 : FontTool->currentTextures.size()-1); | 221 | scrl->setMax(FontTool->currentTextures.size() == 0 ? 0 : FontTool->currentTextures.size()-1); |
222 | 222 | ||
223 | if (FontTool->currentTextures.size() > 0) | 223 | if (FontTool->currentTextures.size() > 0) |
224 | { | 224 | { |
225 | IGUIImage* img = (IGUIImage*)env->getRootGUIElement()->getElementFromId(MYGUI_IMAGE,true); | 225 | IGUIImage* img = (IGUIImage*)env->getRootGUIElement()->getElementFromId(MYGUI_IMAGE,true); |
226 | img->setImage(FontTool->currentTextures[0]); | 226 | img->setImage(FontTool->currentTextures[0]); |
227 | scrl->setPos(0); | 227 | scrl->setPos(0); |
228 | } | 228 | } |
229 | 229 | ||
230 | // make sure users pick a file format that supports alpha channel | 230 | // make sure users pick a file format that supports alpha channel |
231 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); | 231 | cbo = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); |
232 | cbo->clear(); | 232 | cbo->clear(); |
233 | 233 | ||
234 | if (vec) | 234 | if (vec) |
235 | { | 235 | { |
236 | // add vector formats | 236 | // add vector formats |
237 | for (s32 i=0; fileformats[i] != 0; ++i) | 237 | for (s32 i=0; fileformats[i] != 0; ++i) |
238 | cbo->addItem( core::stringw(vectorfileformats[i]).c_str()); | 238 | cbo->addItem( core::stringw(vectorfileformats[i]).c_str()); |
239 | } | 239 | } |
240 | else | 240 | else |
241 | { | 241 | { |
242 | if (!alpha) | 242 | if (!alpha) |
243 | { | 243 | { |
244 | // add non-alpha formats | 244 | // add non-alpha formats |
245 | for (s32 i=0; fileformats[i] != 0; ++i) | 245 | for (s32 i=0; fileformats[i] != 0; ++i) |
246 | cbo->addItem( core::stringw(fileformats[i]).c_str()); | 246 | cbo->addItem( core::stringw(fileformats[i]).c_str()); |
247 | } | 247 | } |
248 | // add formats which support alpha | 248 | // add formats which support alpha |
249 | for (s32 i=0; alphafileformats[i] != 0; ++i) | 249 | for (s32 i=0; alphafileformats[i] != 0; ++i) |
250 | cbo->addItem( core::stringw(alphafileformats[i]).c_str()); | 250 | cbo->addItem( core::stringw(alphafileformats[i]).c_str()); |
251 | } | 251 | } |
252 | if (VecTool) | 252 | if (VecTool) |
253 | { | 253 | { |
254 | delete VecTool; | 254 | delete VecTool; |
255 | VecTool = 0; | 255 | VecTool = 0; |
256 | } | 256 | } |
257 | if (vec) | 257 | if (vec) |
258 | { | 258 | { |
259 | VecTool = new CVectorFontTool(FontTool); | 259 | VecTool = new CVectorFontTool(FontTool); |
260 | } | 260 | } |
261 | 261 | ||
262 | /* Message box letting the user know the process is complete */ | 262 | /* Message box letting the user know the process is complete */ |
263 | env->addMessageBox(L"Create", completeText); | 263 | env->addMessageBox(L"Create", completeText); |
264 | 264 | ||
265 | return true; | 265 | return true; |
266 | } | 266 | } |
267 | 267 | ||
268 | if (id == MYGUI_SAVE) | 268 | if (id == MYGUI_SAVE) |
269 | { | 269 | { |
270 | IGUIEditBox *edt = (IGUIEditBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FILENAME,true); | 270 | IGUIEditBox *edt = (IGUIEditBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FILENAME,true); |
271 | core::stringc name = edt->getText(); | 271 | core::stringc name = edt->getText(); |
272 | 272 | ||
273 | IGUIComboBox *fmt = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); | 273 | IGUIComboBox *fmt = (IGUIComboBox*)env->getRootGUIElement()->getElementFromId(MYGUI_FORMAT,true); |
274 | core::stringc format = fmt->getItem(fmt->getSelected()); | 274 | core::stringc format = fmt->getItem(fmt->getSelected()); |
275 | 275 | ||
276 | // vector fonts disabled | 276 | // vector fonts disabled |
277 | IGUICheckBox *chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_VECTOR,true); | 277 | IGUICheckBox *chk = (IGUICheckBox*)env->getRootGUIElement()->getElementFromId(MYGUI_VECTOR,true); |
278 | bool vec = false; // chk->isChecked(); | 278 | bool vec = false; // chk->isChecked(); |
279 | 279 | ||
280 | if (vec && VecTool) | 280 | if (vec && VecTool) |
281 | VecTool->saveVectorFont(name.c_str(), format.c_str()); | 281 | VecTool->saveVectorFont(name.c_str(), format.c_str()); |
282 | else | 282 | else |
283 | FontTool->saveBitmapFont(name.c_str(), format.c_str()); | 283 | FontTool->saveBitmapFont(name.c_str(), format.c_str()); |
284 | 284 | ||
285 | return true; | 285 | return true; |
286 | } | 286 | } |
287 | 287 | ||
288 | if (id == MYGUI_HELPBUTTON) | 288 | if (id == MYGUI_HELPBUTTON) |
289 | { | 289 | { |
290 | env->addMessageBox(L"Irrlicht Unicode Font Tool", helptext); | 290 | env->addMessageBox(L"Irrlicht Unicode Font Tool", helptext); |
291 | return true; | 291 | return true; |
292 | } | 292 | } |
293 | 293 | ||
294 | break; | 294 | break; |
295 | } | 295 | } |
296 | } | 296 | } |
297 | 297 | ||
298 | return false; | 298 | return false; |
299 | } | 299 | } |
300 | 300 | ||
301 | IrrlichtDevice* Device; | 301 | IrrlichtDevice* Device; |
302 | CFontTool* FontTool; | 302 | CFontTool* FontTool; |
303 | CVectorFontTool* VecTool; | 303 | CVectorFontTool* VecTool; |
304 | 304 | ||
305 | }; | 305 | }; |
306 | 306 | ||
307 | void createGUI(IrrlichtDevice* device, CFontTool* fc) | 307 | void createGUI(IrrlichtDevice* device, CFontTool* fc) |
308 | { | 308 | { |
309 | gui::IGUIEnvironment *env = device->getGUIEnvironment(); | 309 | gui::IGUIEnvironment *env = device->getGUIEnvironment(); |
310 | 310 | ||
311 | // change transparency of skin | 311 | // change transparency of skin |
312 | for (s32 i=0; i<gui::EGDC_COUNT ; ++i) | 312 | for (s32 i=0; i<gui::EGDC_COUNT ; ++i) |
313 | { | 313 | { |
314 | video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); | 314 | video::SColor col = env->getSkin()->getColor((gui::EGUI_DEFAULT_COLOR)i); |
315 | col.setAlpha(255); | 315 | col.setAlpha(255); |
316 | env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); | 316 | env->getSkin()->setColor((gui::EGUI_DEFAULT_COLOR)i, col); |
317 | } | 317 | } |
318 | 318 | ||
319 | IGUIWindow *win = env->addWindow( core::rect<s32>(10,10,200,500), false, L"Font Creator"); | 319 | IGUIWindow *win = env->addWindow( core::rect<s32>(10,10,200,500), false, L"Font Creator"); |
320 | win->getCloseButton()->setVisible(false); | 320 | win->getCloseButton()->setVisible(false); |
321 | 321 | ||
322 | s32 xs=10,xp=xs, yp=30, h=20; | 322 | s32 xs=10,xp=xs, yp=30, h=20; |
323 | 323 | ||
324 | env->addStaticText(L"Charset", core::rect<s32>(xp,yp,50,yp+h),false,false, win); | 324 | env->addStaticText(L"Charset", core::rect<s32>(xp,yp,50,yp+h),false,false, win); |
325 | 325 | ||
326 | xp+=60; | 326 | xp+=60; |
327 | 327 | ||
328 | // charset combo | 328 | // charset combo |
329 | gui::IGUIComboBox* cbo = env->addComboBox( core::rect<s32>(xp,yp,180,yp+h),win, MYGUI_CHARSET); | 329 | gui::IGUIComboBox* cbo = env->addComboBox( core::rect<s32>(xp,yp,180,yp+h),win, MYGUI_CHARSET); |
330 | for (u32 i=0; i < fc->CharSets.size(); ++i) | 330 | for (u32 i=0; i < fc->CharSets.size(); ++i) |
331 | cbo->addItem(fc->CharSets[i].c_str()); | 331 | cbo->addItem(fc->CharSets[i].c_str()); |
332 | 332 | ||
333 | yp += (s32)(h*1.5f); | 333 | yp += (s32)(h*1.5f); |
334 | xp = xs; | 334 | xp = xs; |
335 | 335 | ||
336 | env->addStaticText(L"Font", core::rect<s32>(xp,yp,50,yp+h),false,false, win); | 336 | env->addStaticText(L"Font", core::rect<s32>(xp,yp,50,yp+h),false,false, win); |
337 | 337 | ||
338 | xp+=60; | 338 | xp+=60; |
339 | 339 | ||
340 | // font name combo | 340 | // font name combo |
341 | cbo = env->addComboBox( core::rect<s32>(xp,yp,180,yp+h),win, MYGUI_FONTNAME); | 341 | cbo = env->addComboBox( core::rect<s32>(xp,yp,180,yp+h),win, MYGUI_FONTNAME); |
342 | for (u32 i=0; i < fc->FontNames.size(); ++i) | 342 | for (u32 i=0; i < fc->FontNames.size(); ++i) |
343 | cbo->addItem(fc->FontNames[i].c_str()); | 343 | cbo->addItem(fc->FontNames[i].c_str()); |
344 | 344 | ||
345 | yp += (s32)(h*1.5f); | 345 | yp += (s32)(h*1.5f); |
346 | xp = xs; | 346 | xp = xs; |
347 | 347 | ||
348 | env->addStaticText(L"Size", core::rect<s32>(xp,yp,50,yp+h),false,false, win); | 348 | env->addStaticText(L"Size", core::rect<s32>(xp,yp,50,yp+h),false,false, win); |
349 | 349 | ||
350 | xp += 60; | 350 | xp += 60; |
351 | 351 | ||
352 | // font size combo | 352 | // font size combo |
353 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_SIZE); | 353 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_SIZE); |
354 | for (s32 i=0; fc->FontSizes[i] != 0; ++i) | 354 | for (s32 i=0; fc->FontSizes[i] != 0; ++i) |
355 | cbo->addItem( ((core::stringw(fc->FontSizes[i])) + L"px").c_str()); | 355 | cbo->addItem( ((core::stringw(fc->FontSizes[i])) + L"px").c_str()); |
356 | 356 | ||
357 | xp = xs; | 357 | xp = xs; |
358 | yp += (s32)(h*1.5f); | 358 | yp += (s32)(h*1.5f); |
359 | 359 | ||
360 | // bold checkbox | 360 | // bold checkbox |
361 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_BOLD, L"Bold"); | 361 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_BOLD, L"Bold"); |
362 | 362 | ||
363 | xp += 45; | 363 | xp += 45; |
364 | 364 | ||
365 | // italic checkbox | 365 | // italic checkbox |
366 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ITALIC, L"Italic"); | 366 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ITALIC, L"Italic"); |
367 | 367 | ||
368 | xp += 45; | 368 | xp += 45; |
369 | 369 | ||
370 | // AA checkbox | 370 | // AA checkbox |
371 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ANTIALIAS, L"AA"); | 371 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ANTIALIAS, L"AA"); |
372 | 372 | ||
373 | xp +=40; | 373 | xp +=40; |
374 | 374 | ||
375 | // Alpha checkbox | 375 | // Alpha checkbox |
376 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ALPHA, L"Alpha"); | 376 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_ALPHA, L"Alpha"); |
377 | 377 | ||
378 | xp = xs; | 378 | xp = xs; |
379 | yp += (s32)(h*1.5f); | 379 | yp += (s32)(h*1.5f); |
380 | 380 | ||
381 | /* | 381 | /* |
382 | // vector fonts can't be loaded yet | 382 | // vector fonts can't be loaded yet |
383 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+200,yp+h),win, MYGUI_VECTOR, L"Vector Font"); | 383 | env->addCheckBox(false, core::rect<s32>(xp,yp,xp+200,yp+h),win, MYGUI_VECTOR, L"Vector Font"); |
384 | */ | 384 | */ |
385 | 385 | ||
386 | yp += (s32)(h*1.5f); | 386 | yp += (s32)(h*1.5f); |
387 | 387 | ||
388 | env->addStaticText(L"Max Width:", core::rect<s32>(xp,yp,50,yp+h),false,false, win); | 388 | env->addStaticText(L"Max Width:", core::rect<s32>(xp,yp,50,yp+h),false,false, win); |
389 | 389 | ||
390 | xp += 60; | 390 | xp += 60; |
391 | 391 | ||
392 | // texture widths | 392 | // texture widths |
393 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_TEXWIDTH); | 393 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_TEXWIDTH); |
394 | for (s32 i=0; texturesizes[i] != 0; ++i) | 394 | for (s32 i=0; texturesizes[i] != 0; ++i) |
395 | cbo->addItem( ((core::stringw(texturesizes[i])) + L" wide").c_str()); | 395 | cbo->addItem( ((core::stringw(texturesizes[i])) + L" wide").c_str()); |
396 | 396 | ||
397 | xp=xs; | 397 | xp=xs; |
398 | yp += (s32)(h*1.5f); | 398 | yp += (s32)(h*1.5f); |
399 | 399 | ||
400 | env->addStaticText(L"Max Height:", core::rect<s32>(xp,yp,60,yp+h),false,false, win); | 400 | env->addStaticText(L"Max Height:", core::rect<s32>(xp,yp,60,yp+h),false,false, win); |
401 | 401 | ||
402 | xp += 60; | 402 | xp += 60; |
403 | 403 | ||
404 | // texture height | 404 | // texture height |
405 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_TEXHEIGHT); | 405 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_TEXHEIGHT); |
406 | for (s32 i=0; texturesizes[i] != 0; ++i) | 406 | for (s32 i=0; texturesizes[i] != 0; ++i) |
407 | cbo->addItem( ((core::stringw(texturesizes[i])) + L" tall").c_str()); | 407 | cbo->addItem( ((core::stringw(texturesizes[i])) + L" tall").c_str()); |
408 | 408 | ||
409 | // file name | 409 | // file name |
410 | xp = xs; | 410 | xp = xs; |
411 | yp += (s32)(h*1.5f); | 411 | yp += (s32)(h*1.5f); |
412 | env->addStaticText(L"Filename", core::rect<s32>(xp,yp,60,yp+h),false,false, win); | 412 | env->addStaticText(L"Filename", core::rect<s32>(xp,yp,60,yp+h),false,false, win); |
413 | xp += 60; | 413 | xp += 60; |
414 | env->addEditBox(L"myfont",core::rect<s32>(xp,yp,xp+70,yp+h), true, win, MYGUI_FILENAME); | 414 | env->addEditBox(L"myfont",core::rect<s32>(xp,yp,xp+70,yp+h), true, win, MYGUI_FILENAME); |
415 | 415 | ||
416 | // file format | 416 | // file format |
417 | xp = xs; | 417 | xp = xs; |
418 | yp += (s32)(h*1.5f); | 418 | yp += (s32)(h*1.5f); |
419 | env->addStaticText(L"File Format", core::rect<s32>(xp,yp,60,yp+h),false,false, win); | 419 | env->addStaticText(L"File Format", core::rect<s32>(xp,yp,60,yp+h),false,false, win); |
420 | xp += 60; | 420 | xp += 60; |
421 | 421 | ||
422 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_FORMAT); | 422 | cbo = env->addComboBox( core::rect<s32>(xp,yp,xp+70,yp+h),win, MYGUI_FORMAT); |
423 | for (s32 i=0; fileformats[i] != 0; ++i) | 423 | for (s32 i=0; fileformats[i] != 0; ++i) |
424 | cbo->addItem( core::stringw(fileformats[i]).c_str()); | 424 | cbo->addItem( core::stringw(fileformats[i]).c_str()); |
425 | for (s32 i=0; alphafileformats[i] != 0; ++i) | 425 | for (s32 i=0; alphafileformats[i] != 0; ++i) |
426 | cbo->addItem( core::stringw(alphafileformats[i]).c_str()); | 426 | cbo->addItem( core::stringw(alphafileformats[i]).c_str()); |
427 | 427 | ||
428 | xp = xs; | 428 | xp = xs; |
429 | yp += h*2; | 429 | yp += h*2; |
430 | 430 | ||
431 | // create button | 431 | // create button |
432 | env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_CREATE, L"Create"); | 432 | env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_CREATE, L"Create"); |
433 | 433 | ||
434 | xp += 60; | 434 | xp += 60; |
435 | 435 | ||
436 | // save button | 436 | // save button |
437 | env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_SAVE, L"Save"); | 437 | env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_SAVE, L"Save"); |
438 | 438 | ||
439 | xp += 60; | 439 | xp += 60; |
440 | 440 | ||
441 | // help button | 441 | // help button |
442 | env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_HELPBUTTON, L"Help"); | 442 | env->addButton( core::rect<s32>(xp,yp,xp+50,yp+h),win, MYGUI_HELPBUTTON, L"Help"); |
443 | 443 | ||
444 | // font image | 444 | // font image |
445 | gui::IGUIImage *img = env->addImage(0, core::position2d<s32>(0,0), true,0, MYGUI_IMAGE); | 445 | gui::IGUIImage *img = env->addImage(0, core::position2d<s32>(0,0), true,0, MYGUI_IMAGE); |
446 | img->setRelativePosition(core::rect<s32>(0,20,800,600)); | 446 | img->setRelativePosition(core::rect<s32>(0,20,800,600)); |
447 | 447 | ||
448 | // font scrollbar | 448 | // font scrollbar |
449 | IGUIScrollBar *scrl= env->addScrollBar(true,core::rect<s32>(0,0,800,20),0, MYGUI_CURRENTIMAGE); | 449 | IGUIScrollBar *scrl= env->addScrollBar(true,core::rect<s32>(0,0,800,20),0, MYGUI_CURRENTIMAGE); |
450 | scrl->setMax(0); | 450 | scrl->setMax(0); |
451 | scrl->setSmallStep(1); | 451 | scrl->setSmallStep(1); |
452 | 452 | ||
453 | yp += h*3; | 453 | yp += h*3; |
454 | 454 | ||
455 | env->getRootGUIElement()->bringToFront(win); | 455 | env->getRootGUIElement()->bringToFront(win); |
456 | win->setRelativePosition( core::rect<s32>(10,10,200,yp)); | 456 | win->setRelativePosition( core::rect<s32>(10,10,200,yp)); |
457 | } | 457 | } |
458 | 458 | ||
459 | int main() | 459 | int main() |
460 | { | 460 | { |
461 | IrrlichtDevice* device =createDevice(video::EDT_OPENGL, core::dimension2du(800, 600)); | 461 | IrrlichtDevice* device =createDevice(video::EDT_OPENGL, core::dimension2du(800, 600)); |
462 | video::IVideoDriver* driver = device->getVideoDriver(); | 462 | video::IVideoDriver* driver = device->getVideoDriver(); |
463 | scene::ISceneManager* smgr = device->getSceneManager(); | 463 | scene::ISceneManager* smgr = device->getSceneManager(); |
464 | gui::IGUIEnvironment *env = device->getGUIEnvironment(); | 464 | gui::IGUIEnvironment *env = device->getGUIEnvironment(); |
465 | 465 | ||
466 | // create font tool | 466 | // create font tool |
467 | CFontTool *fc = new CFontTool(device); | 467 | CFontTool *fc = new CFontTool(device); |
468 | CVectorFontTool *vc = 0; | 468 | CVectorFontTool *vc = 0; |
469 | 469 | ||
470 | IEventReceiver *events = new MyEventReceiver(device,fc,vc); | 470 | IEventReceiver *events = new MyEventReceiver(device,fc,vc); |
471 | 471 | ||
472 | createGUI(device, fc); | 472 | createGUI(device, fc); |
473 | 473 | ||
474 | while(device->run()) | 474 | while(device->run()) |
475 | { | 475 | { |
476 | if (device->isWindowActive()) | 476 | if (device->isWindowActive()) |
477 | { | 477 | { |
478 | 478 | ||
479 | driver->beginScene(true, true, video::SColor(0,200,200,200)); | 479 | driver->beginScene(true, true, video::SColor(0,200,200,200)); |
480 | smgr->drawAll(); | 480 | smgr->drawAll(); |
481 | env->drawAll(); | 481 | env->drawAll(); |
482 | driver->endScene(); | 482 | driver->endScene(); |
483 | } | 483 | } |
484 | } | 484 | } |
485 | 485 | ||
486 | // drop the font tool and resources | 486 | // drop the font tool and resources |
487 | fc->drop(); | 487 | fc->drop(); |
488 | 488 | ||
489 | device->drop(); | 489 | device->drop(); |
490 | 490 | ||
491 | return 0; | 491 | return 0; |
492 | } | 492 | } |
493 | 493 | ||
diff --git a/libraries/irrlicht-1.8/tools/IrrFontTool/readme.txt b/libraries/irrlicht-1.8/tools/IrrFontTool/readme.txt index fda16d5..092deb1 100644 --- a/libraries/irrlicht-1.8/tools/IrrFontTool/readme.txt +++ b/libraries/irrlicht-1.8/tools/IrrFontTool/readme.txt | |||
@@ -1,13 +1,13 @@ | |||
1 | There are two tools available for creating fonts for irrlicht, both are supported. | 1 | There are two tools available for creating fonts for irrlicht, both are supported. |
2 | 2 | ||
3 | oldFontTool: | 3 | oldFontTool: |
4 | only works in Windows, creates a simple image file containing all data for displaying fonts. | 4 | only works in Windows, creates a simple image file containing all data for displaying fonts. |
5 | Those file contain no alpha informations and are limited in their character set. | 5 | Those file contain no alpha informations and are limited in their character set. |
6 | use the IrrFontTool.exe file in this directory. | 6 | use the IrrFontTool.exe file in this directory. |
7 | 7 | ||
8 | newFontTool: | 8 | newFontTool: |
9 | a more sophisticated font tool supporting alpha channels, anti aliasing, | 9 | a more sophisticated font tool supporting alpha channels, anti aliasing, |
10 | different character sets, vector fonts and other operating systems than | 10 | different character sets, vector fonts and other operating systems than |
11 | just windows. It will create multiple image files and an .xml file | 11 | just windows. It will create multiple image files and an .xml file |
12 | containing meta information for the generated font. | 12 | containing meta information for the generated font. |
13 | You can find it as FontTool.exe in the /bin directory. \ No newline at end of file | 13 | You can find it as FontTool.exe in the /bin directory. \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/MeshConverter/Makefile b/libraries/irrlicht-1.8/tools/MeshConverter/Makefile index 5328223..ac4b78c 100644 --- a/libraries/irrlicht-1.8/tools/MeshConverter/Makefile +++ b/libraries/irrlicht-1.8/tools/MeshConverter/Makefile | |||
@@ -1,38 +1,38 @@ | |||
1 | # Makefile for Irrlicht Examples | 1 | # Makefile for Irrlicht Examples |
2 | # It's usually sufficient to change just the target name and source file list | 2 | # It's usually sufficient to change just the target name and source file list |
3 | # and be sure that CXX is set to a valid compiler | 3 | # and be sure that CXX is set to a valid compiler |
4 | Target = MeshConverter | 4 | Target = MeshConverter |
5 | Sources = main.cpp | 5 | Sources = main.cpp |
6 | 6 | ||
7 | # general compiler settings | 7 | # general compiler settings |
8 | CPPFLAGS = -I../../include -I/usr/X11R6/include | 8 | CPPFLAGS = -I../../include -I/usr/X11R6/include |
9 | CXXFLAGS = -O3 -ffast-math -Wall | 9 | CXXFLAGS = -O3 -ffast-math -Wall |
10 | #CXXFLAGS = -g -Wall | 10 | #CXXFLAGS = -g -Wall |
11 | 11 | ||
12 | #default target is Linux | 12 | #default target is Linux |
13 | all: all_linux | 13 | all: all_linux |
14 | 14 | ||
15 | ifeq ($(HOSTTYPE), x86_64) | 15 | ifeq ($(HOSTTYPE), x86_64) |
16 | LIBSELECT=64 | 16 | LIBSELECT=64 |
17 | endif | 17 | endif |
18 | 18 | ||
19 | # target specific settings | 19 | # target specific settings |
20 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 | 20 | all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 |
21 | all_linux clean_linux: SYSTEM=Linux | 21 | all_linux clean_linux: SYSTEM=Linux |
22 | all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lglu32 -lm | 22 | all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lglu32 -lm |
23 | all_win32 clean_win32: SYSTEM=Win32-gcc | 23 | all_win32 clean_win32: SYSTEM=Win32-gcc |
24 | all_win32 clean_win32: SUF=.exe | 24 | all_win32 clean_win32: SUF=.exe |
25 | # name of the binary - only valid for targets which set SYSTEM | 25 | # name of the binary - only valid for targets which set SYSTEM |
26 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) | 26 | DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF) |
27 | 27 | ||
28 | all_linux all_win32: | 28 | all_linux all_win32: |
29 | $(warning Building...) | 29 | $(warning Building...) |
30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) | 30 | $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS) |
31 | 31 | ||
32 | clean: clean_linux clean_win32 | 32 | clean: clean_linux clean_win32 |
33 | $(warning Cleaning...) | 33 | $(warning Cleaning...) |
34 | 34 | ||
35 | clean_linux clean_win32: | 35 | clean_linux clean_win32: |
36 | @$(RM) $(DESTPATH) | 36 | @$(RM) $(DESTPATH) |
37 | 37 | ||
38 | .PHONY: all all_win32 clean clean_linux clean_win32 | 38 | .PHONY: all all_win32 clean clean_linux clean_win32 |
diff --git a/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_v9.vcproj b/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_v9.vcproj index 5747218..09fef60 100644 --- a/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_v9.vcproj +++ b/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_v9.vcproj | |||
@@ -1,187 +1,187 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | <VisualStudioProject | 2 | <VisualStudioProject |
3 | ProjectType="Visual C++" | 3 | ProjectType="Visual C++" |
4 | Version="9,00" | 4 | Version="9,00" |
5 | Name="Mesh Converter" | 5 | Name="Mesh Converter" |
6 | ProjectGUID="{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" | 6 | ProjectGUID="{E72B637E-4AA6-46F3-885F-AC67B4B470ED}" |
7 | RootNamespace="GUI Editor" | 7 | RootNamespace="GUI Editor" |
8 | Keyword="Win32Proj" | 8 | Keyword="Win32Proj" |
9 | TargetFrameworkVersion="131072" | 9 | TargetFrameworkVersion="131072" |
10 | > | 10 | > |
11 | <Platforms> | 11 | <Platforms> |
12 | <Platform | 12 | <Platform |
13 | Name="Win32" | 13 | Name="Win32" |
14 | /> | 14 | /> |
15 | </Platforms> | 15 | </Platforms> |
16 | <ToolFiles> | 16 | <ToolFiles> |
17 | </ToolFiles> | 17 | </ToolFiles> |
18 | <Configurations> | 18 | <Configurations> |
19 | <Configuration | 19 | <Configuration |
20 | Name="Debug|Win32" | 20 | Name="Debug|Win32" |
21 | OutputDirectory="Debug" | 21 | OutputDirectory="Debug" |
22 | IntermediateDirectory="Debug" | 22 | IntermediateDirectory="Debug" |
23 | ConfigurationType="1" | 23 | ConfigurationType="1" |
24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 24 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
25 | CharacterSet="2" | 25 | CharacterSet="2" |
26 | > | 26 | > |
27 | <Tool | 27 | <Tool |
28 | Name="VCPreBuildEventTool" | 28 | Name="VCPreBuildEventTool" |
29 | /> | 29 | /> |
30 | <Tool | 30 | <Tool |
31 | Name="VCCustomBuildTool" | 31 | Name="VCCustomBuildTool" |
32 | /> | 32 | /> |
33 | <Tool | 33 | <Tool |
34 | Name="VCXMLDataGeneratorTool" | 34 | Name="VCXMLDataGeneratorTool" |
35 | /> | 35 | /> |
36 | <Tool | 36 | <Tool |
37 | Name="VCWebServiceProxyGeneratorTool" | 37 | Name="VCWebServiceProxyGeneratorTool" |
38 | /> | 38 | /> |
39 | <Tool | 39 | <Tool |
40 | Name="VCMIDLTool" | 40 | Name="VCMIDLTool" |
41 | /> | 41 | /> |
42 | <Tool | 42 | <Tool |
43 | Name="VCCLCompilerTool" | 43 | Name="VCCLCompilerTool" |
44 | Optimization="0" | 44 | Optimization="0" |
45 | FavorSizeOrSpeed="0" | 45 | FavorSizeOrSpeed="0" |
46 | WholeProgramOptimization="false" | 46 | WholeProgramOptimization="false" |
47 | AdditionalIncludeDirectories="..\..\include" | 47 | AdditionalIncludeDirectories="..\..\include" |
48 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | 48 | PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" |
49 | MinimalRebuild="true" | 49 | MinimalRebuild="true" |
50 | BasicRuntimeChecks="3" | 50 | BasicRuntimeChecks="3" |
51 | RuntimeLibrary="1" | 51 | RuntimeLibrary="1" |
52 | UsePrecompiledHeader="0" | 52 | UsePrecompiledHeader="0" |
53 | WarningLevel="3" | 53 | WarningLevel="3" |
54 | DebugInformationFormat="4" | 54 | DebugInformationFormat="4" |
55 | /> | 55 | /> |
56 | <Tool | 56 | <Tool |
57 | Name="VCManagedResourceCompilerTool" | 57 | Name="VCManagedResourceCompilerTool" |
58 | /> | 58 | /> |
59 | <Tool | 59 | <Tool |
60 | Name="VCResourceCompilerTool" | 60 | Name="VCResourceCompilerTool" |
61 | /> | 61 | /> |
62 | <Tool | 62 | <Tool |
63 | Name="VCPreLinkEventTool" | 63 | Name="VCPreLinkEventTool" |
64 | /> | 64 | /> |
65 | <Tool | 65 | <Tool |
66 | Name="VCLinkerTool" | 66 | Name="VCLinkerTool" |
67 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " | 67 | AdditionalOptions=" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib " |
68 | OutputFile="../../bin/Win32-visualstudio/MeshConverter.exe" | 68 | OutputFile="../../bin/Win32-visualstudio/MeshConverter.exe" |
69 | LinkIncremental="2" | 69 | LinkIncremental="2" |
70 | AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" | 70 | AdditionalLibraryDirectories=""..\..\lib\Win32-visualstudio"" |
71 | GenerateDebugInformation="true" | 71 | GenerateDebugInformation="true" |
72 | ProgramDatabaseFile="$(OutDir)/TestProject.pdb" | 72 | ProgramDatabaseFile="$(OutDir)/TestProject.pdb" |
73 | SubSystem="1" | 73 | SubSystem="1" |
74 | RandomizedBaseAddress="1" | 74 | RandomizedBaseAddress="1" |
75 | DataExecutionPrevention="0" | 75 | DataExecutionPrevention="0" |
76 | TargetMachine="1" | 76 | TargetMachine="1" |
77 | /> | 77 | /> |
78 | <Tool | 78 | <Tool |
79 | Name="VCALinkTool" | 79 | Name="VCALinkTool" |
80 | /> | 80 | /> |
81 | <Tool | 81 | <Tool |
82 | Name="VCManifestTool" | 82 | Name="VCManifestTool" |
83 | /> | 83 | /> |
84 | <Tool | 84 | <Tool |
85 | Name="VCXDCMakeTool" | 85 | Name="VCXDCMakeTool" |
86 | /> | 86 | /> |
87 | <Tool | 87 | <Tool |
88 | Name="VCBscMakeTool" | 88 | Name="VCBscMakeTool" |
89 | /> | 89 | /> |
90 | <Tool | 90 | <Tool |
91 | Name="VCFxCopTool" | 91 | Name="VCFxCopTool" |
92 | /> | 92 | /> |
93 | <Tool | 93 | <Tool |
94 | Name="VCAppVerifierTool" | 94 | Name="VCAppVerifierTool" |
95 | /> | 95 | /> |
96 | <Tool | 96 | <Tool |
97 | Name="VCPostBuildEventTool" | 97 | Name="VCPostBuildEventTool" |
98 | /> | 98 | /> |
99 | </Configuration> | 99 | </Configuration> |
100 | <Configuration | 100 | <Configuration |
101 | Name="Release|Win32" | 101 | Name="Release|Win32" |
102 | OutputDirectory="Release" | 102 | OutputDirectory="Release" |
103 | IntermediateDirectory="Release" | 103 | IntermediateDirectory="Release" |
104 | ConfigurationType="1" | 104 | ConfigurationType="1" |
105 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | 105 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" |
106 | CharacterSet="2" | 106 | CharacterSet="2" |
107 | > | 107 | > |
108 | <Tool | 108 | <Tool |
109 | Name="VCPreBuildEventTool" | 109 | Name="VCPreBuildEventTool" |
110 | /> | 110 | /> |
111 | <Tool | 111 | <Tool |
112 | Name="VCCustomBuildTool" | 112 | Name="VCCustomBuildTool" |
113 | /> | 113 | /> |
114 | <Tool | 114 | <Tool |
115 | Name="VCXMLDataGeneratorTool" | 115 | Name="VCXMLDataGeneratorTool" |
116 | /> | 116 | /> |
117 | <Tool | 117 | <Tool |
118 | Name="VCWebServiceProxyGeneratorTool" | 118 | Name="VCWebServiceProxyGeneratorTool" |
119 | /> | 119 | /> |
120 | <Tool | 120 | <Tool |
121 | Name="VCMIDLTool" | 121 | Name="VCMIDLTool" |
122 | /> | 122 | /> |
123 | <Tool | 123 | <Tool |
124 | Name="VCCLCompilerTool" | 124 | Name="VCCLCompilerTool" |
125 | Optimization="3" | 125 | Optimization="3" |
126 | WholeProgramOptimization="false" | 126 | WholeProgramOptimization="false" |
127 | AdditionalIncludeDirectories="..\..\include" | 127 | AdditionalIncludeDirectories="..\..\include" |
128 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | 128 | PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" |
129 | RuntimeLibrary="0" | 129 | RuntimeLibrary="0" |
130 | UsePrecompiledHeader="0" | 130 | UsePrecompiledHeader="0" |
131 | WarningLevel="3" | 131 | WarningLevel="3" |
132 | /> | 132 | /> |
133 | <Tool | 133 | <Tool |
134 | Name="VCManagedResourceCompilerTool" | 134 | Name="VCManagedResourceCompilerTool" |
135 | /> | 135 | /> |
136 | <Tool | 136 | <Tool |
137 | Name="VCResourceCompilerTool" | 137 | Name="VCResourceCompilerTool" |
138 | /> | 138 | /> |
139 | <Tool | 139 | <Tool |
140 | Name="VCPreLinkEventTool" | 140 | Name="VCPreLinkEventTool" |
141 | /> | 141 | /> |
142 | <Tool | 142 | <Tool |
143 | Name="VCLinkerTool" | 143 | Name="VCLinkerTool" |
144 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" | 144 | OutputFile="../../bin/Win32-visualstudio/GUIEditor.exe" |
145 | LinkIncremental="1" | 145 | LinkIncremental="1" |
146 | GenerateDebugInformation="true" | 146 | GenerateDebugInformation="true" |
147 | SubSystem="1" | 147 | SubSystem="1" |
148 | OptimizeReferences="2" | 148 | OptimizeReferences="2" |
149 | EnableCOMDATFolding="2" | 149 | EnableCOMDATFolding="2" |
150 | RandomizedBaseAddress="1" | 150 | RandomizedBaseAddress="1" |
151 | DataExecutionPrevention="0" | 151 | DataExecutionPrevention="0" |
152 | TargetMachine="1" | 152 | TargetMachine="1" |
153 | /> | 153 | /> |
154 | <Tool | 154 | <Tool |
155 | Name="VCALinkTool" | 155 | Name="VCALinkTool" |
156 | /> | 156 | /> |
157 | <Tool | 157 | <Tool |
158 | Name="VCManifestTool" | 158 | Name="VCManifestTool" |
159 | /> | 159 | /> |
160 | <Tool | 160 | <Tool |
161 | Name="VCXDCMakeTool" | 161 | Name="VCXDCMakeTool" |
162 | /> | 162 | /> |
163 | <Tool | 163 | <Tool |
164 | Name="VCBscMakeTool" | 164 | Name="VCBscMakeTool" |
165 | /> | 165 | /> |
166 | <Tool | 166 | <Tool |
167 | Name="VCFxCopTool" | 167 | Name="VCFxCopTool" |
168 | /> | 168 | /> |
169 | <Tool | 169 | <Tool |
170 | Name="VCAppVerifierTool" | 170 | Name="VCAppVerifierTool" |
171 | /> | 171 | /> |
172 | <Tool | 172 | <Tool |
173 | Name="VCPostBuildEventTool" | 173 | Name="VCPostBuildEventTool" |
174 | /> | 174 | /> |
175 | </Configuration> | 175 | </Configuration> |
176 | </Configurations> | 176 | </Configurations> |
177 | <References> | 177 | <References> |
178 | </References> | 178 | </References> |
179 | <Files> | 179 | <Files> |
180 | <File | 180 | <File |
181 | RelativePath=".\main.cpp" | 181 | RelativePath=".\main.cpp" |
182 | > | 182 | > |
183 | </File> | 183 | </File> |
184 | </Files> | 184 | </Files> |
185 | <Globals> | 185 | <Globals> |
186 | </Globals> | 186 | </Globals> |
187 | </VisualStudioProject> | 187 | </VisualStudioProject> |
diff --git a/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc10.vcxproj b/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc10.vcxproj index 1f1ce49..f994800 100644 --- a/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc10.vcxproj +++ b/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc10.vcxproj | |||
@@ -1,192 +1,192 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectName>MeshConverter</ProjectName> | 22 | <ProjectName>MeshConverter</ProjectName> |
23 | <ProjectGuid>{E72B637E-4AA6-46F3-885F-AC67B4B470ED}</ProjectGuid> | 23 | <ProjectGuid>{E72B637E-4AA6-46F3-885F-AC67B4B470ED}</ProjectGuid> |
24 | <RootNamespace>GUI Editor</RootNamespace> | 24 | <RootNamespace>GUI Editor</RootNamespace> |
25 | <Keyword>Win32Proj</Keyword> | 25 | <Keyword>Win32Proj</Keyword> |
26 | </PropertyGroup> | 26 | </PropertyGroup> |
27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
29 | <ConfigurationType>Application</ConfigurationType> | 29 | <ConfigurationType>Application</ConfigurationType> |
30 | <CharacterSet>MultiByte</CharacterSet> | 30 | <CharacterSet>MultiByte</CharacterSet> |
31 | </PropertyGroup> | 31 | </PropertyGroup> |
32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 32 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
33 | <ConfigurationType>Application</ConfigurationType> | 33 | <ConfigurationType>Application</ConfigurationType> |
34 | <CharacterSet>MultiByte</CharacterSet> | 34 | <CharacterSet>MultiByte</CharacterSet> |
35 | </PropertyGroup> | 35 | </PropertyGroup> |
36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 36 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
37 | <ConfigurationType>Application</ConfigurationType> | 37 | <ConfigurationType>Application</ConfigurationType> |
38 | <CharacterSet>MultiByte</CharacterSet> | 38 | <CharacterSet>MultiByte</CharacterSet> |
39 | </PropertyGroup> | 39 | </PropertyGroup> |
40 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 40 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
41 | <ConfigurationType>Application</ConfigurationType> | 41 | <ConfigurationType>Application</ConfigurationType> |
42 | <CharacterSet>MultiByte</CharacterSet> | 42 | <CharacterSet>MultiByte</CharacterSet> |
43 | </PropertyGroup> | 43 | </PropertyGroup> |
44 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 44 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
45 | <ImportGroup Label="ExtensionSettings"> | 45 | <ImportGroup Label="ExtensionSettings"> |
46 | </ImportGroup> | 46 | </ImportGroup> |
47 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 47 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
48 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 48 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
49 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 49 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
50 | </ImportGroup> | 50 | </ImportGroup> |
51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
54 | </ImportGroup> | 54 | </ImportGroup> |
55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
58 | </ImportGroup> | 58 | </ImportGroup> |
59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
62 | </ImportGroup> | 62 | </ImportGroup> |
63 | <PropertyGroup Label="UserMacros" /> | 63 | <PropertyGroup Label="UserMacros" /> |
64 | <PropertyGroup> | 64 | <PropertyGroup> |
65 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 65 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
66 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 66 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 67 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
68 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | 68 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | 69 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> | 72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> |
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> | 73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> |
74 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 74 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 75 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
76 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 76 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 77 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
78 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 78 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 79 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 80 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 81 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 82 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 83 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 84 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 85 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
86 | </PropertyGroup> | 86 | </PropertyGroup> |
87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 87 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
88 | <ClCompile> | 88 | <ClCompile> |
89 | <Optimization>Disabled</Optimization> | 89 | <Optimization>Disabled</Optimization> |
90 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 90 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
91 | <WholeProgramOptimization>false</WholeProgramOptimization> | 91 | <WholeProgramOptimization>false</WholeProgramOptimization> |
92 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 92 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
93 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 93 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
94 | <MinimalRebuild>true</MinimalRebuild> | 94 | <MinimalRebuild>true</MinimalRebuild> |
95 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 95 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
96 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 96 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
97 | <PrecompiledHeader> | 97 | <PrecompiledHeader> |
98 | </PrecompiledHeader> | 98 | </PrecompiledHeader> |
99 | <WarningLevel>Level3</WarningLevel> | 99 | <WarningLevel>Level3</WarningLevel> |
100 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 100 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
101 | </ClCompile> | 101 | </ClCompile> |
102 | <Link> | 102 | <Link> |
103 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 103 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
104 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> | 104 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> |
105 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 105 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
106 | <GenerateDebugInformation>true</GenerateDebugInformation> | 106 | <GenerateDebugInformation>true</GenerateDebugInformation> |
107 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> | 107 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> |
108 | <SubSystem>Console</SubSystem> | 108 | <SubSystem>Console</SubSystem> |
109 | <DataExecutionPrevention> | 109 | <DataExecutionPrevention> |
110 | </DataExecutionPrevention> | 110 | </DataExecutionPrevention> |
111 | </Link> | 111 | </Link> |
112 | </ItemDefinitionGroup> | 112 | </ItemDefinitionGroup> |
113 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 113 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
114 | <ClCompile> | 114 | <ClCompile> |
115 | <Optimization>Disabled</Optimization> | 115 | <Optimization>Disabled</Optimization> |
116 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 116 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
117 | <WholeProgramOptimization>false</WholeProgramOptimization> | 117 | <WholeProgramOptimization>false</WholeProgramOptimization> |
118 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 118 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
119 | <PreprocessorDefinitions>WIN32;WIN64_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 119 | <PreprocessorDefinitions>WIN32;WIN64_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
120 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 120 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
121 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 121 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
122 | <PrecompiledHeader> | 122 | <PrecompiledHeader> |
123 | </PrecompiledHeader> | 123 | </PrecompiledHeader> |
124 | <WarningLevel>Level3</WarningLevel> | 124 | <WarningLevel>Level3</WarningLevel> |
125 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 125 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
126 | </ClCompile> | 126 | </ClCompile> |
127 | <Link> | 127 | <Link> |
128 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 128 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
129 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> | 129 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> |
130 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 130 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
131 | <GenerateDebugInformation>true</GenerateDebugInformation> | 131 | <GenerateDebugInformation>true</GenerateDebugInformation> |
132 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> | 132 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> |
133 | <SubSystem>Console</SubSystem> | 133 | <SubSystem>Console</SubSystem> |
134 | <DataExecutionPrevention> | 134 | <DataExecutionPrevention> |
135 | </DataExecutionPrevention> | 135 | </DataExecutionPrevention> |
136 | </Link> | 136 | </Link> |
137 | </ItemDefinitionGroup> | 137 | </ItemDefinitionGroup> |
138 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 138 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
139 | <ClCompile> | 139 | <ClCompile> |
140 | <Optimization>Full</Optimization> | 140 | <Optimization>Full</Optimization> |
141 | <WholeProgramOptimization>false</WholeProgramOptimization> | 141 | <WholeProgramOptimization>false</WholeProgramOptimization> |
142 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 142 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
143 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 143 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
144 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 144 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
145 | <PrecompiledHeader> | 145 | <PrecompiledHeader> |
146 | </PrecompiledHeader> | 146 | </PrecompiledHeader> |
147 | <WarningLevel>Level3</WarningLevel> | 147 | <WarningLevel>Level3</WarningLevel> |
148 | </ClCompile> | 148 | </ClCompile> |
149 | <Link> | 149 | <Link> |
150 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> | 150 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> |
151 | <GenerateDebugInformation>true</GenerateDebugInformation> | 151 | <GenerateDebugInformation>true</GenerateDebugInformation> |
152 | <SubSystem>Console</SubSystem> | 152 | <SubSystem>Console</SubSystem> |
153 | <OptimizeReferences>true</OptimizeReferences> | 153 | <OptimizeReferences>true</OptimizeReferences> |
154 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 154 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
155 | <DataExecutionPrevention> | 155 | <DataExecutionPrevention> |
156 | </DataExecutionPrevention> | 156 | </DataExecutionPrevention> |
157 | </Link> | 157 | </Link> |
158 | </ItemDefinitionGroup> | 158 | </ItemDefinitionGroup> |
159 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 159 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
160 | <ClCompile> | 160 | <ClCompile> |
161 | <Optimization>Full</Optimization> | 161 | <Optimization>Full</Optimization> |
162 | <WholeProgramOptimization>false</WholeProgramOptimization> | 162 | <WholeProgramOptimization>false</WholeProgramOptimization> |
163 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 163 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
164 | <PreprocessorDefinitions>WIN32;WIN64NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 164 | <PreprocessorDefinitions>WIN32;WIN64NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
165 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 165 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
166 | <PrecompiledHeader> | 166 | <PrecompiledHeader> |
167 | </PrecompiledHeader> | 167 | </PrecompiledHeader> |
168 | <WarningLevel>Level3</WarningLevel> | 168 | <WarningLevel>Level3</WarningLevel> |
169 | </ClCompile> | 169 | </ClCompile> |
170 | <Link> | 170 | <Link> |
171 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> | 171 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> |
172 | <GenerateDebugInformation>true</GenerateDebugInformation> | 172 | <GenerateDebugInformation>true</GenerateDebugInformation> |
173 | <SubSystem>Console</SubSystem> | 173 | <SubSystem>Console</SubSystem> |
174 | <OptimizeReferences>true</OptimizeReferences> | 174 | <OptimizeReferences>true</OptimizeReferences> |
175 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 175 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
176 | <DataExecutionPrevention> | 176 | <DataExecutionPrevention> |
177 | </DataExecutionPrevention> | 177 | </DataExecutionPrevention> |
178 | </Link> | 178 | </Link> |
179 | </ItemDefinitionGroup> | 179 | </ItemDefinitionGroup> |
180 | <ItemGroup> | 180 | <ItemGroup> |
181 | <ClCompile Include="main.cpp" /> | 181 | <ClCompile Include="main.cpp" /> |
182 | </ItemGroup> | 182 | </ItemGroup> |
183 | <ItemGroup> | 183 | <ItemGroup> |
184 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> | 184 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> |
185 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> | 185 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> |
186 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | 186 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
187 | </ProjectReference> | 187 | </ProjectReference> |
188 | </ItemGroup> | 188 | </ItemGroup> |
189 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 189 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
190 | <ImportGroup Label="ExtensionTargets"> | 190 | <ImportGroup Label="ExtensionTargets"> |
191 | </ImportGroup> | 191 | </ImportGroup> |
192 | </Project> \ No newline at end of file | 192 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc11.vcxproj b/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc11.vcxproj index 6493206..ccd4271 100644 --- a/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc11.vcxproj +++ b/libraries/irrlicht-1.8/tools/MeshConverter/MeshConverter_vc11.vcxproj | |||
@@ -1,196 +1,196 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <ItemGroup Label="ProjectConfigurations"> | 3 | <ItemGroup Label="ProjectConfigurations"> |
4 | <ProjectConfiguration Include="Debug|Win32"> | 4 | <ProjectConfiguration Include="Debug|Win32"> |
5 | <Configuration>Debug</Configuration> | 5 | <Configuration>Debug</Configuration> |
6 | <Platform>Win32</Platform> | 6 | <Platform>Win32</Platform> |
7 | </ProjectConfiguration> | 7 | </ProjectConfiguration> |
8 | <ProjectConfiguration Include="Debug|x64"> | 8 | <ProjectConfiguration Include="Debug|x64"> |
9 | <Configuration>Debug</Configuration> | 9 | <Configuration>Debug</Configuration> |
10 | <Platform>x64</Platform> | 10 | <Platform>x64</Platform> |
11 | </ProjectConfiguration> | 11 | </ProjectConfiguration> |
12 | <ProjectConfiguration Include="Release|Win32"> | 12 | <ProjectConfiguration Include="Release|Win32"> |
13 | <Configuration>Release</Configuration> | 13 | <Configuration>Release</Configuration> |
14 | <Platform>Win32</Platform> | 14 | <Platform>Win32</Platform> |
15 | </ProjectConfiguration> | 15 | </ProjectConfiguration> |
16 | <ProjectConfiguration Include="Release|x64"> | 16 | <ProjectConfiguration Include="Release|x64"> |
17 | <Configuration>Release</Configuration> | 17 | <Configuration>Release</Configuration> |
18 | <Platform>x64</Platform> | 18 | <Platform>x64</Platform> |
19 | </ProjectConfiguration> | 19 | </ProjectConfiguration> |
20 | </ItemGroup> | 20 | </ItemGroup> |
21 | <PropertyGroup Label="Globals"> | 21 | <PropertyGroup Label="Globals"> |
22 | <ProjectName>MeshConverter</ProjectName> | 22 | <ProjectName>MeshConverter</ProjectName> |
23 | <ProjectGuid>{E72B637E-4AA6-46F3-885F-AC67B4B470ED}</ProjectGuid> | 23 | <ProjectGuid>{E72B637E-4AA6-46F3-885F-AC67B4B470ED}</ProjectGuid> |
24 | <RootNamespace>GUI Editor</RootNamespace> | 24 | <RootNamespace>GUI Editor</RootNamespace> |
25 | <Keyword>Win32Proj</Keyword> | 25 | <Keyword>Win32Proj</Keyword> |
26 | </PropertyGroup> | 26 | </PropertyGroup> |
27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 27 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | 28 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
29 | <ConfigurationType>Application</ConfigurationType> | 29 | <ConfigurationType>Application</ConfigurationType> |
30 | <CharacterSet>MultiByte</CharacterSet> | 30 | <CharacterSet>MultiByte</CharacterSet> |
31 | <PlatformToolset>v110</PlatformToolset> | 31 | <PlatformToolset>v110</PlatformToolset> |
32 | </PropertyGroup> | 32 | </PropertyGroup> |
33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | 33 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
34 | <ConfigurationType>Application</ConfigurationType> | 34 | <ConfigurationType>Application</ConfigurationType> |
35 | <CharacterSet>MultiByte</CharacterSet> | 35 | <CharacterSet>MultiByte</CharacterSet> |
36 | <PlatformToolset>v110</PlatformToolset> | 36 | <PlatformToolset>v110</PlatformToolset> |
37 | </PropertyGroup> | 37 | </PropertyGroup> |
38 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | 38 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
39 | <ConfigurationType>Application</ConfigurationType> | 39 | <ConfigurationType>Application</ConfigurationType> |
40 | <CharacterSet>MultiByte</CharacterSet> | 40 | <CharacterSet>MultiByte</CharacterSet> |
41 | <PlatformToolset>v110</PlatformToolset> | 41 | <PlatformToolset>v110</PlatformToolset> |
42 | </PropertyGroup> | 42 | </PropertyGroup> |
43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | 43 | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
44 | <ConfigurationType>Application</ConfigurationType> | 44 | <ConfigurationType>Application</ConfigurationType> |
45 | <CharacterSet>MultiByte</CharacterSet> | 45 | <CharacterSet>MultiByte</CharacterSet> |
46 | <PlatformToolset>v110</PlatformToolset> | 46 | <PlatformToolset>v110</PlatformToolset> |
47 | </PropertyGroup> | 47 | </PropertyGroup> |
48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
49 | <ImportGroup Label="ExtensionSettings"> | 49 | <ImportGroup Label="ExtensionSettings"> |
50 | </ImportGroup> | 50 | </ImportGroup> |
51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> | 51 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 52 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 53 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
54 | </ImportGroup> | 54 | </ImportGroup> |
55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> | 55 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> |
56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 56 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 57 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
58 | </ImportGroup> | 58 | </ImportGroup> |
59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> | 59 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 60 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 61 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
62 | </ImportGroup> | 62 | </ImportGroup> |
63 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> | 63 | <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> |
64 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | 64 | <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
65 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> | 65 | <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
66 | </ImportGroup> | 66 | </ImportGroup> |
67 | <PropertyGroup Label="UserMacros" /> | 67 | <PropertyGroup Label="UserMacros" /> |
68 | <PropertyGroup> | 68 | <PropertyGroup> |
69 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> | 69 | <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> |
70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 70 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 71 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> | 72 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> | 73 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> |
74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> | 74 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\Win32-VisualStudio\</OutDir> |
75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> | 75 | <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\Win64-VisualStudio\</OutDir> |
76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> | 76 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> |
77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> | 77 | <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> |
78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 78 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 79 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 80 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 81 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> | 82 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> |
83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> | 83 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> |
84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> | 84 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> |
85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> | 85 | <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> |
86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 86 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 87 | <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> | 88 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> |
89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> | 89 | <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> |
90 | </PropertyGroup> | 90 | </PropertyGroup> |
91 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | 91 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
92 | <ClCompile> | 92 | <ClCompile> |
93 | <Optimization>Disabled</Optimization> | 93 | <Optimization>Disabled</Optimization> |
94 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 94 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
95 | <WholeProgramOptimization>false</WholeProgramOptimization> | 95 | <WholeProgramOptimization>false</WholeProgramOptimization> |
96 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 96 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
97 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 97 | <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
98 | <MinimalRebuild>true</MinimalRebuild> | 98 | <MinimalRebuild>true</MinimalRebuild> |
99 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 99 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
100 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 100 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
101 | <PrecompiledHeader> | 101 | <PrecompiledHeader> |
102 | </PrecompiledHeader> | 102 | </PrecompiledHeader> |
103 | <WarningLevel>Level3</WarningLevel> | 103 | <WarningLevel>Level3</WarningLevel> |
104 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> | 104 | <DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
105 | </ClCompile> | 105 | </ClCompile> |
106 | <Link> | 106 | <Link> |
107 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 107 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
108 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> | 108 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> |
109 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 109 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
110 | <GenerateDebugInformation>true</GenerateDebugInformation> | 110 | <GenerateDebugInformation>true</GenerateDebugInformation> |
111 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> | 111 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> |
112 | <SubSystem>Console</SubSystem> | 112 | <SubSystem>Console</SubSystem> |
113 | <DataExecutionPrevention> | 113 | <DataExecutionPrevention> |
114 | </DataExecutionPrevention> | 114 | </DataExecutionPrevention> |
115 | </Link> | 115 | </Link> |
116 | </ItemDefinitionGroup> | 116 | </ItemDefinitionGroup> |
117 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | 117 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
118 | <ClCompile> | 118 | <ClCompile> |
119 | <Optimization>Disabled</Optimization> | 119 | <Optimization>Disabled</Optimization> |
120 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> | 120 | <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
121 | <WholeProgramOptimization>false</WholeProgramOptimization> | 121 | <WholeProgramOptimization>false</WholeProgramOptimization> |
122 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 122 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
123 | <PreprocessorDefinitions>WIN32;WIN64_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 123 | <PreprocessorDefinitions>WIN32;WIN64_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
124 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> | 124 | <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
125 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | 125 | <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
126 | <PrecompiledHeader> | 126 | <PrecompiledHeader> |
127 | </PrecompiledHeader> | 127 | </PrecompiledHeader> |
128 | <WarningLevel>Level3</WarningLevel> | 128 | <WarningLevel>Level3</WarningLevel> |
129 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> | 129 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
130 | </ClCompile> | 130 | </ClCompile> |
131 | <Link> | 131 | <Link> |
132 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> | 132 | <AdditionalOptions> kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib opengl32.lib %(AdditionalOptions)</AdditionalOptions> |
133 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> | 133 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> |
134 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | 134 | <AdditionalLibraryDirectories>..\..\lib\Win32-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> |
135 | <GenerateDebugInformation>true</GenerateDebugInformation> | 135 | <GenerateDebugInformation>true</GenerateDebugInformation> |
136 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> | 136 | <ProgramDatabaseFile>$(OutDir)TestProject.pdb</ProgramDatabaseFile> |
137 | <SubSystem>Console</SubSystem> | 137 | <SubSystem>Console</SubSystem> |
138 | <DataExecutionPrevention> | 138 | <DataExecutionPrevention> |
139 | </DataExecutionPrevention> | 139 | </DataExecutionPrevention> |
140 | </Link> | 140 | </Link> |
141 | </ItemDefinitionGroup> | 141 | </ItemDefinitionGroup> |
142 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | 142 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
143 | <ClCompile> | 143 | <ClCompile> |
144 | <Optimization>Full</Optimization> | 144 | <Optimization>Full</Optimization> |
145 | <WholeProgramOptimization>false</WholeProgramOptimization> | 145 | <WholeProgramOptimization>false</WholeProgramOptimization> |
146 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 146 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
147 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 147 | <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
148 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 148 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
149 | <PrecompiledHeader> | 149 | <PrecompiledHeader> |
150 | </PrecompiledHeader> | 150 | </PrecompiledHeader> |
151 | <WarningLevel>Level3</WarningLevel> | 151 | <WarningLevel>Level3</WarningLevel> |
152 | </ClCompile> | 152 | </ClCompile> |
153 | <Link> | 153 | <Link> |
154 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> | 154 | <OutputFile>../../bin/Win32-visualstudio/MeshConverter.exe</OutputFile> |
155 | <GenerateDebugInformation>true</GenerateDebugInformation> | 155 | <GenerateDebugInformation>true</GenerateDebugInformation> |
156 | <SubSystem>Console</SubSystem> | 156 | <SubSystem>Console</SubSystem> |
157 | <OptimizeReferences>true</OptimizeReferences> | 157 | <OptimizeReferences>true</OptimizeReferences> |
158 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 158 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
159 | <DataExecutionPrevention> | 159 | <DataExecutionPrevention> |
160 | </DataExecutionPrevention> | 160 | </DataExecutionPrevention> |
161 | </Link> | 161 | </Link> |
162 | </ItemDefinitionGroup> | 162 | </ItemDefinitionGroup> |
163 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | 163 | <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
164 | <ClCompile> | 164 | <ClCompile> |
165 | <Optimization>Full</Optimization> | 165 | <Optimization>Full</Optimization> |
166 | <WholeProgramOptimization>false</WholeProgramOptimization> | 166 | <WholeProgramOptimization>false</WholeProgramOptimization> |
167 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | 167 | <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> |
168 | <PreprocessorDefinitions>WIN32;WIN64NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | 168 | <PreprocessorDefinitions>WIN32;WIN64NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
169 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | 169 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
170 | <PrecompiledHeader> | 170 | <PrecompiledHeader> |
171 | </PrecompiledHeader> | 171 | </PrecompiledHeader> |
172 | <WarningLevel>Level3</WarningLevel> | 172 | <WarningLevel>Level3</WarningLevel> |
173 | </ClCompile> | 173 | </ClCompile> |
174 | <Link> | 174 | <Link> |
175 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> | 175 | <OutputFile>../../bin/Win64-visualstudio/MeshConverter.exe</OutputFile> |
176 | <GenerateDebugInformation>true</GenerateDebugInformation> | 176 | <GenerateDebugInformation>true</GenerateDebugInformation> |
177 | <SubSystem>Console</SubSystem> | 177 | <SubSystem>Console</SubSystem> |
178 | <OptimizeReferences>true</OptimizeReferences> | 178 | <OptimizeReferences>true</OptimizeReferences> |
179 | <EnableCOMDATFolding>true</EnableCOMDATFolding> | 179 | <EnableCOMDATFolding>true</EnableCOMDATFolding> |
180 | <DataExecutionPrevention> | 180 | <DataExecutionPrevention> |
181 | </DataExecutionPrevention> | 181 | </DataExecutionPrevention> |
182 | </Link> | 182 | </Link> |
183 | </ItemDefinitionGroup> | 183 | </ItemDefinitionGroup> |
184 | <ItemGroup> | 184 | <ItemGroup> |
185 | <ClCompile Include="main.cpp" /> | 185 | <ClCompile Include="main.cpp" /> |
186 | </ItemGroup> | 186 | </ItemGroup> |
187 | <ItemGroup> | 187 | <ItemGroup> |
188 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> | 188 | <ProjectReference Include="..\..\source\Irrlicht\Irrlicht10.0.vcxproj"> |
189 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> | 189 | <Project>{e08e042a-6c45-411b-92be-3cc31331019f}</Project> |
190 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | 190 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> |
191 | </ProjectReference> | 191 | </ProjectReference> |
192 | </ItemGroup> | 192 | </ItemGroup> |
193 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 193 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
194 | <ImportGroup Label="ExtensionTargets"> | 194 | <ImportGroup Label="ExtensionTargets"> |
195 | </ImportGroup> | 195 | </ImportGroup> |
196 | </Project> \ No newline at end of file | 196 | </Project> \ No newline at end of file |
diff --git a/libraries/irrlicht-1.8/tools/MeshConverter/main.cpp b/libraries/irrlicht-1.8/tools/MeshConverter/main.cpp index d6b878f..f05d6fa 100644 --- a/libraries/irrlicht-1.8/tools/MeshConverter/main.cpp +++ b/libraries/irrlicht-1.8/tools/MeshConverter/main.cpp | |||
@@ -1,108 +1,108 @@ | |||
1 | #include <irrlicht.h> | 1 | #include <irrlicht.h> |
2 | #include <iostream> | 2 | #include <iostream> |
3 | 3 | ||
4 | using namespace irr; | 4 | using namespace irr; |
5 | 5 | ||
6 | using namespace core; | 6 | using namespace core; |
7 | using namespace scene; | 7 | using namespace scene; |
8 | using namespace video; | 8 | using namespace video; |
9 | using namespace io; | 9 | using namespace io; |
10 | using namespace gui; | 10 | using namespace gui; |
11 | 11 | ||
12 | #ifdef _IRR_WINDOWS_ | 12 | #ifdef _IRR_WINDOWS_ |
13 | #pragma comment(lib, "Irrlicht.lib") | 13 | #pragma comment(lib, "Irrlicht.lib") |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | void usage(const char* name) | 16 | void usage(const char* name) |
17 | { | 17 | { |
18 | std::cerr << "Usage: " << name << " [options] <srcFile> <destFile>" << std::endl; | 18 | std::cerr << "Usage: " << name << " [options] <srcFile> <destFile>" << std::endl; |
19 | std::cerr << " where options are" << std::endl; | 19 | std::cerr << " where options are" << std::endl; |
20 | std::cerr << " --createTangents: convert to tangents mesh is possible." << std::endl; | 20 | std::cerr << " --createTangents: convert to tangents mesh is possible." << std::endl; |
21 | std::cerr << " --format=[irrmesh|collada|stl|obj|ply]: Choose target format" << std::endl; | 21 | std::cerr << " --format=[irrmesh|collada|stl|obj|ply]: Choose target format" << std::endl; |
22 | } | 22 | } |
23 | 23 | ||
24 | int main(int argc, char* argv[]) | 24 | int main(int argc, char* argv[]) |
25 | { | 25 | { |
26 | if ((argc < 3) || | 26 | if ((argc < 3) || |
27 | ((argc==3) && (argv[1][0]=='-'))) | 27 | ((argc==3) && (argv[1][0]=='-'))) |
28 | { | 28 | { |
29 | usage(argv[0]); | 29 | usage(argv[0]); |
30 | return 1; | 30 | return 1; |
31 | } | 31 | } |
32 | 32 | ||
33 | IrrlichtDevice *device = createDevice( video::EDT_NULL, | 33 | IrrlichtDevice *device = createDevice( video::EDT_NULL, |
34 | dimension2d<u32>(800, 600), 32, false, false, false, 0); | 34 | dimension2d<u32>(800, 600), 32, false, false, false, 0); |
35 | 35 | ||
36 | device->setWindowCaption(L"Mesh Converter"); | 36 | device->setWindowCaption(L"Mesh Converter"); |
37 | 37 | ||
38 | scene::EMESH_WRITER_TYPE type = EMWT_IRR_MESH; | 38 | scene::EMESH_WRITER_TYPE type = EMWT_IRR_MESH; |
39 | u32 i=1; | 39 | u32 i=1; |
40 | bool createTangents=false; | 40 | bool createTangents=false; |
41 | while (argv[i][0]=='-') | 41 | while (argv[i][0]=='-') |
42 | { | 42 | { |
43 | core::stringc format = argv[i]; | 43 | core::stringc format = argv[i]; |
44 | if (format.size() > 3) | 44 | if (format.size() > 3) |
45 | { | 45 | { |
46 | if (format.equalsn("--format=",9)) | 46 | if (format.equalsn("--format=",9)) |
47 | { | 47 | { |
48 | format = format.subString(9,format.size()); | 48 | format = format.subString(9,format.size()); |
49 | if (format=="collada") | 49 | if (format=="collada") |
50 | type = EMWT_COLLADA; | 50 | type = EMWT_COLLADA; |
51 | else if (format=="stl") | 51 | else if (format=="stl") |
52 | type = EMWT_STL; | 52 | type = EMWT_STL; |
53 | else if (format=="obj") | 53 | else if (format=="obj") |
54 | type = EMWT_OBJ; | 54 | type = EMWT_OBJ; |
55 | else if (format=="ply") | 55 | else if (format=="ply") |
56 | type = EMWT_PLY; | 56 | type = EMWT_PLY; |
57 | else | 57 | else |
58 | type = EMWT_IRR_MESH; | 58 | type = EMWT_IRR_MESH; |
59 | } | 59 | } |
60 | else | 60 | else |
61 | if (format =="--createTangents") | 61 | if (format =="--createTangents") |
62 | createTangents=true; | 62 | createTangents=true; |
63 | } | 63 | } |
64 | else | 64 | else |
65 | if (format=="--") | 65 | if (format=="--") |
66 | { | 66 | { |
67 | ++i; | 67 | ++i; |
68 | break; | 68 | break; |
69 | } | 69 | } |
70 | ++i; | 70 | ++i; |
71 | } | 71 | } |
72 | 72 | ||
73 | const s32 srcmesh = i; | 73 | const s32 srcmesh = i; |
74 | const s32 destmesh = i+1; | 74 | const s32 destmesh = i+1; |
75 | 75 | ||
76 | --argc; | 76 | --argc; |
77 | if ((argc<srcmesh) || (argc<destmesh)) | 77 | if ((argc<srcmesh) || (argc<destmesh)) |
78 | { | 78 | { |
79 | std::cerr << "Not enough files given." << std::endl; | 79 | std::cerr << "Not enough files given." << std::endl; |
80 | usage(argv[0]); | 80 | usage(argv[0]); |
81 | return 1; | 81 | return 1; |
82 | } | 82 | } |
83 | 83 | ||
84 | createTangents = createTangents && (type==EMWT_IRR_MESH); | 84 | createTangents = createTangents && (type==EMWT_IRR_MESH); |
85 | std::cout << "Converting " << argv[srcmesh] << " to " << argv[destmesh] << std::endl; | 85 | std::cout << "Converting " << argv[srcmesh] << " to " << argv[destmesh] << std::endl; |
86 | IMesh* mesh = device->getSceneManager()->getMesh(argv[srcmesh])->getMesh(0); | 86 | IMesh* mesh = device->getSceneManager()->getMesh(argv[srcmesh])->getMesh(0); |
87 | if (!mesh) | 87 | if (!mesh) |
88 | { | 88 | { |
89 | std::cerr << "Could not load " << argv[srcmesh] << std::endl; | 89 | std::cerr << "Could not load " << argv[srcmesh] << std::endl; |
90 | return 1; | 90 | return 1; |
91 | } | 91 | } |
92 | if (createTangents) | 92 | if (createTangents) |
93 | { | 93 | { |
94 | IMesh* tmp = device->getSceneManager()->getMeshManipulator()->createMeshWithTangents(mesh); | 94 | IMesh* tmp = device->getSceneManager()->getMeshManipulator()->createMeshWithTangents(mesh); |
95 | mesh->drop(); | 95 | mesh->drop(); |
96 | mesh=tmp; | 96 | mesh=tmp; |
97 | } | 97 | } |
98 | IMeshWriter* mw = device->getSceneManager()->createMeshWriter(type); | 98 | IMeshWriter* mw = device->getSceneManager()->createMeshWriter(type); |
99 | IWriteFile* file = device->getFileSystem()->createAndWriteFile(argv[destmesh]); | 99 | IWriteFile* file = device->getFileSystem()->createAndWriteFile(argv[destmesh]); |
100 | mw->writeMesh(file, mesh); | 100 | mw->writeMesh(file, mesh); |
101 | 101 | ||
102 | file->drop(); | 102 | file->drop(); |
103 | mw->drop(); | 103 | mw->drop(); |
104 | device->drop(); | 104 | device->drop(); |
105 | 105 | ||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
diff --git a/libraries/irrlicht-1.8/tools/irrEdit/irrEdit.txt b/libraries/irrlicht-1.8/tools/irrEdit/irrEdit.txt index 5e6fe60..48c5f2a 100644 --- a/libraries/irrlicht-1.8/tools/irrEdit/irrEdit.txt +++ b/libraries/irrlicht-1.8/tools/irrEdit/irrEdit.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | irrEdit is a free scene graph editor for Irrlicht Engine .irr files and is capable as being used as world editor, | 1 | irrEdit is a free scene graph editor for Irrlicht Engine .irr files and is capable as being used as world editor, |
2 | particle system designer, meshviewer and more. It is a visual front end for the Irrlicht Engine, and thus has a lot | 2 | particle system designer, meshviewer and more. It is a visual front end for the Irrlicht Engine, and thus has a lot |
3 | of impressive features like importing meshes of every format Irrlicht supports, simple but powerful material | 3 | of impressive features like importing meshes of every format Irrlicht supports, simple but powerful material |
4 | system and lots of special effects. | 4 | system and lots of special effects. |
5 | 5 | ||
6 | For package size reasons, irrEdit is not included in this SDK, but you can download it from | 6 | For package size reasons, irrEdit is not included in this SDK, but you can download it from |
7 | http://www.ambiera.com/irredit \ No newline at end of file | 7 | http://www.ambiera.com/irredit \ No newline at end of file |