View difference between Paste ID: S5ZmQHrK and H2tj3Aq3
SHOW: | | - or go back to the newest paste.
1
Mon 01 Apr 2013 10:34:13 AM EDT 
2
Doyousketch2
3
-------------------------------
4
5
This is not an actual C++ source file.
6
Its a text describing the source file structure of Minetest - as of ver 0.4.5 so far.
7-
It's a text describing the source file structure of Minetest - as of ver 0.4.5 so far.
7+
Its simply saved as .cpp so it will highlight in your text editor 
8-
It's simply saved as .cpp so it will highlight in your text editor 
8+
9
10
Structure of minetest source and support libraries found in /usr/include.
11
Its just to show the heirarchy of where objects, variables, and whatnot get defined.
12-
It's just to show the heirarchy of where objects, variables, and whatnot get defined.
12+
13
14
main.cpp // Load settings, Mouse and Keyboard, Main Menu, run game, exit.
15
16
17
18
	#include "irrlicht.h"
19
20
		#include "IrrCompileConfig.h"
21
		#include "aabbox3d.h"
22
		#include "CDynamicMeshBuffer.h"
23
		#include "CIndexBuffer.h"
24
		#include "CMeshBuffer.h"
25
		#include "coreutil.h"
26
		#include "CVertexBuffer.h"
27
		#include "dimension2d.h"
28
		#include "ECullingTypes.h"
29
		#include "EDebugSceneTypes.h"
30
		#include "EDriverFeatures.h"
31
		#include "EDriverTypes.h"
32
		#include "EGUIAlignment.h"
33
		#include "EGUIElementTypes.h"
34
		#include "EHardwareBufferFlags.h"
35
		#include "EMaterialFlags.h"
36
		#include "EMaterialTypes.h"
37
		#include "EMeshWriterEnums.h"
38
		#include "EMessageBoxFlags.h"
39
		#include "ESceneNodeAnimatorTypes.h"
40
		#include "ESceneNodeTypes.h"
41
		#include "ETerrainElements.h"
42
		#include "fast_atof.h"
43
		#include "heapsort.h"
44
		#include "IAnimatedMesh.h"
45
		#include "IAnimatedMeshMD2.h"
46
		#include "IAnimatedMeshMD3.h"
47
		#include "IAnimatedMeshSceneNode.h"
48
		#include "IAttributeExchangingObject.h"
49
		#include "IAttributes.h"
50
		#include "IBillboardSceneNode.h"
51
		#include "IBillboardTextSceneNode.h"
52
		#include "IBoneSceneNode.h"
53
		#include "ICameraSceneNode.h"
54
		#include "ICursorControl.h"
55
		#include "IDummyTransformationSceneNode.h"
56
		#include "IDynamicMeshBuffer.h"
57
		#include "IEventReceiver.h"
58
		#include "IFileList.h"
59
		#include "IFileSystem.h"
60
		#include "IGeometryCreator.h"
61
		#include "IGPUProgrammingServices.h"
62
		#include "IGUIButton.h"
63
		#include "IGUICheckBox.h"
64
		#include "IGUIColorSelectDialog.h"
65
		#include "IGUIComboBox.h"
66
		#include "IGUIContextMenu.h"
67
		#include "IGUIEditBox.h"
68
		#include "IGUIElement.h"
69
		#include "IGUIElementFactory.h"
70
		#include "IGUIEnvironment.h"
71
		#include "IGUIFileOpenDialog.h"
72
		#include "IGUIFont.h"
73
		#include "IGUIFontBitmap.h"
74
		#include "IGUIImage.h"
75
		#include "IGUIInOutFader.h"
76
		#include "IGUIListBox.h"
77
		#include "IGUIMeshViewer.h"
78
		#include "IGUIScrollBar.h"
79
		#include "IGUISkin.h"
80
		#include "IGUISpinBox.h"
81
		#include "IGUISpriteBank.h"
82
		#include "IGUIStaticText.h"
83
		#include "IGUITabControl.h"
84
		#include "IGUITable.h"
85
		#include "IGUIToolbar.h"
86
		#include "IGUIWindow.h"
87
		#include "IGUITreeView.h"
88
		#include "IImage.h"
89
		#include "IImageLoader.h"
90
		#include "IImageWriter.h"
91
		#include "IIndexBuffer.h"
92
		#include "ILightSceneNode.h"
93
		#include "ILogger.h"
94
		#include "IMaterialRenderer.h"
95
		#include "IMaterialRendererServices.h"
96
		#include "IMesh.h"
97
		#include "IMeshBuffer.h"
98
		#include "IMeshCache.h"
99
		#include "IMeshLoader.h"
100
		#include "IMeshManipulator.h"
101
		#include "IMeshSceneNode.h"
102
		#include "IMeshWriter.h"
103
		#include "IMetaTriangleSelector.h"
104
		#include "IOSOperator.h"
105
		#include "IParticleSystemSceneNode.h" // also includes all emitters and attractors
106
		#include "IQ3LevelMesh.h"
107
		#include "IQ3Shader.h"
108
		#include "IReadFile.h"
109
		#include "IReferenceCounted.h"
110
		#include "irrArray.h"
111
		#include "IrrlichtDevice.h"
112
		#include "irrList.h"
113
		#include "irrMap.h"
114
		#include "irrMath.h"
115
		#include "irrString.h"
116
		#include "irrTypes.h"
117
		#include "path.h"
118
		#include "irrXML.h"
119
		#include "ISceneCollisionManager.h"
120
		#include "ISceneManager.h"
121
		#include "ISceneNode.h"
122
		#include "ISceneNodeAnimator.h"
123
		#include "ISceneNodeAnimatorCameraFPS.h"
124
		#include "ISceneNodeAnimatorCameraMaya.h"
125
		#include "ISceneNodeAnimatorCollisionResponse.h"
126
		#include "ISceneNodeAnimatorFactory.h"
127
		#include "ISceneNodeFactory.h"
128
		#include "ISceneUserDataSerializer.h"
129
		#include "IShaderConstantSetCallBack.h"
130
		#include "IShadowVolumeSceneNode.h"
131
		#include "ISkinnedMesh.h"
132
		#include "ITerrainSceneNode.h"
133
		#include "ITextSceneNode.h"
134
		#include "ITexture.h"
135
		#include "ITimer.h"
136
		#include "ITriangleSelector.h"
137
		#include "IVertexBuffer.h"
138
		#include "IVideoDriver.h"
139
		#include "IVideoModeList.h"
140
		#include "IVolumeLightSceneNode.h"
141
		#include "IWriteFile.h"
142
		#include "IXMLReader.h"
143
		#include "IXMLWriter.h"
144
		#include "ILightManager.h"
145
		#include "Keycodes.h"
146
		#include "line2d.h"
147
		#include "line3d.h"
148
		#include "matrix4.h"
149
		#include "plane3d.h"
150
		#include "position2d.h"
151
		#include "quaternion.h"
152
		#include "rect.h"
153
		#include "S3DVertex.h"
154
		#include "SAnimatedMesh.h"
155
		#include "SceneParameters.h"
156
		#include "SColor.h"
157
		#include "SExposedVideoData.h"
158
		#include "SIrrCreationParameters.h"
159
		#include "SKeyMap.h"
160
		#include "SLight.h"
161
		#include "SMaterial.h"
162
		#include "SMesh.h"
163
		#include "SMeshBuffer.h"
164
		#include "SMeshBufferLightMap.h"
165
		#include "SMeshBufferTangents.h"
166
		#include "SParticle.h"
167
		#include "SSharedMeshBuffer.h"
168
		#include "SSkinMeshBuffer.h"
169
		#include "SVertexIndex.h"
170
		#include "SViewFrustum.h"
171
		#include "triangle3d.h"
172
		#include "vector2d.h"
173
		#include "vector3d.h"
174
175
176
177
	#include "main.h"
178
179
		// Settings
180
		class Settings;
181
		extern Settings *g_settings;
182
183
		// Global profiler
184
		class Profiler;
185
		extern Profiler *g_profiler;
186
187
		// Debug streams
188
		#include <fstream>
189
190
191
192
	#include "mainmenumanager.h"
193
194
		#include "debug.h" // assert
195
		#include "modalMenu.h"
196
		#include "guiPauseMenu.h" // For IGameCallback
197
		#include <list>
198
199
		extern gui::IGUIEnvironment* guienv;
200
		extern gui::IGUIStaticText *guiroot;
201
202
		class MainMenuManager : public IMenuManager
203
204
			virtual void createdMenu(GUIModalMenu *menu)
205
			virtual void deletingMenu(GUIModalMenu *menu)
206
207
		extern MainMenuManager g_menumgr;
208
		extern bool noMenuActive();
209
210
		class MainGameCallback : public IGameCallback
211
212
			virtual void exitToOS
213
			virtual void disconnect
214
			virtual void changePassword
215
			virtual void changeVolume
216
217
		extern MainGameCallback *g_gamecallback;
218
219
220
221
	#include <iostream>
222
223
		Narrow characters (char)
224
			cin		// standard input stream
225
			cout  		// standard output stream
226
			cerr  		// standard output stream for erros
227
			clog		// standard output stream for logging
228
		Wide characters (wchar_t)
229
			wcin
230
			wcout
231
			wcerr
232
			wclog
233
234
235
236
	#include <fstream>
237
238
		Public members
239
240
			(constructor)	//    Construct object and optionally open file (public member function)
241
			rdbuf		//    Get the associated filebuf object (public member function)
242
			is_open		//    Check if a file is open (public member function)
243
			open		//    Open file (public member function)
244
			close		//    Close file (public member function)
245
246
247
		Members inherited from istream
248
249
			operator>>	//    Extract formatted input (public member function )
250
			gcount		//    Get character count (public member function )
251
			get		//    Get characters (public member function )
252
			getline		//    Get line (public member function )
253
			ignore		//    Extract and discard characters (public member function )
254
			peek		//    Peek next character (public member function )
255
			read		//    Read block of data (public member function )
256
			readsome	//    Read data available in buffer (public member function )
257
			putback		//    Put character back (public member function )
258
			unget		//    Unget character (public member function )
259
			tellg		//    Get position in input sequence (public member function )
260
			seekg		//    Set position in input sequence (public member function )
261
			sync		//    Synchronize input buffer (public member function )
262
			sentry		//    Prepare stream for input (public member class )
263
264
265
		Members inherited from ostream
266
267
			operator<<	//    Insert formatted output (public member function )
268
			put		//    Put character (public member function )
269
			write		//    Write block of data (public member function )
270
			tellp		//    Get position in output sequence (public member function )
271
			seekp		//    Set position in output sequence (public member function )
272
			flush		//    Flush output stream buffer (public member function )
273
			sentry		//    Prepare stream for output (public member class )
274
275
276
		Member functions inherited from ios
277
278
			good		//    Check whether state of stream is good (public member function )
279
			eof		//    Check whether eofbit is set (public member function )
280
			fail		//    Check whether either failbit or badbit is set (public member function )
281
			bad		//    Check whether badbit is set (public member function )
282
			operator!	//    Evaluate stream (not) (public member function )
283
			operator void*	//    Evaluate stream (public member function )
284
			rdstate		//    Get error state flags (public member function )
285
			setstate	//    Set error state flag (public member function )
286
			clear		//    Set error state flags (public member function )
287
			copyfmt		//    Copy formatting information (public member function )
288
			fill		//    Get/set fill character (public member function )
289
			exceptions	//    Get/set exceptions mask (public member function )
290
			imbue		//    Imbue locale (public member function )
291
			tie		//    Get/set tied stream (public member function )
292
			narrow		//    Narrow character (public member function )
293
			widen		//    Widen character (public member function )
294
295
296
		Member functions inherited from ios_base
297
298
			flags			//    Get/set format flags (public member function )
299
			setf			//    Set specific format flags (public member function )
300
			unsetf			//    Clear specific format flags (public member function )
301
			precision		//    Get/Set floating-point decimal precision (public member function )
302
			width			//    Get/set field width (public member function )
303
			imbue			//    Imbue locale (public member function )
304
			getloc			//    Get current locale (public member function )
305
			xalloc			//    Get new index for extensible array [static] (public static member function )
306
			iword			//    Get integer element of extensible array (public member function )
307
			pword			//    Get pointer element of extensible array (public member function )
308
			register_callback	//    Register event callback function (public member function )
309
			sync_with_stdio		//    Toggle synchronization with cstdio streams [static] (public static member function )
310
311
312
313
	#include <locale.h>
314
315
		Facet management:
316
317
			use_facet		//    Access facet of locale (function template)
318
			has_facet		//    Check if locale has facet (function template)
319
320
321
		Convenience interfaces (template versions of the cctype functions):
322
323
			isspace			//    Check if character is a white-space (function )
324
			isprint			//    Check if character is printable (function )
325
			iscntrl			//    Check if character is a control character (function )
326
			isupper			//    Check if character is uppercase letter (function )
327
			islower			//    Check if character is lowercase letter (function )
328
			isalpha			//    Check if character is alphabetic (function )
329
			isdigit			//    Check if character is decimal digit (function )
330
			ispunct			//    Check if character is a punctuation character (function )
331
			isxdigit		//    Check if character is hexadecimal digit (function )
332
			isalnum			//    Check if character is alphanumeric (function )
333
			isgraph			//    Check if character has graphical representation (function )
334
335
336
		Classes
337
338
			locale			//    Locale class (class )
339
340
341
		Standard facets:
342
343
			ctype			//    Character type facet (class template)
344
			ctype_byname		//    Character type facet (class template)
345
			codecvt			//    Convert codeset facet (class template)
346
			codecvt_byname		//    Convert codeset facet (class template)
347
			num_get			//    Facet to parse numeric values (class template )
348
			num_put			//    Facet to format numeric values (class template )
349
			numpunct		//    Numeric punctuation facet (class template)
350
			numpunct_byname		//    Numeric puntuation facet (class template)
351
			collate			//    Facet to compare and hash strings (class template)
352
			collate_byname		//    Facet to compare and hash strings (class template)
353
			time_get		//    Facet to parse dates and times (class template)
354
			time_get_byname		//    Facet to parse dates and times (class template)
355
			time_put		//    Facet to format dates and times (class template)
356
			time_put_byname		//    Facet to format dates and times (class template)
357
			money_get		//    Facet to parse monetary expressions (class template)
358
			money_put		//    Facet to format monetary expressions (class template)
359
			moneypunct		//    Monetary punctuation facet (class template)
360
			moneypunct_byname	//    Monetary punctuation facet (class template)
361
			messages		//    Facet to access message catalogs (class template)
362
			messages_byname		//    Facet to access message catalogs (class template)
363
364
365
		Base classes for standard facets (defining member types):
366
367
			ctype_base		//    Base class for ctype (class)
368
			codecvt_base		//    Base class for codecvt (class)
369
			time_base		//    Base class for time_get (class)
370
			money_base		//    Base class for moneypunct (class)
371
372
373
374
	#include "irrlichttypes_extrabloated.h"
375
376
		#include "irrlichttypes_bloated.h"
377
378
			#include "irrlichttypes.h"
379
380
				#include <irrTypes.h>
381
382
				using namespace irr;
383
384
				// Irrlicht 1.8+ defines 64bit unsigned symbol in irrTypes.h
385
				#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
386
				#ifdef _MSC_VER
387
					// Windows
388
					typedef long long s64;
389
					typedef unsigned long long u64;
390
				#else
391
					// Posix
392
					#include <stdint.h>
393
					typedef int64_t s64;
394
					typedef uint64_t u64;
395
396
397
			#include "irr_v2d.h"
398
			#include "irr_v3d.h"
399
			#include "irr_aabb3d.h"
400
401
			#include <irrMap.h>
402
			#include <irrList.h>
403
			#include <irrArray.h>
404
			#include <SColor.h>
405
406
407
		#ifndef SERVER
408
		#include <IMesh.h>
409
		#include <IImage.h>
410
		#include <IrrlichtDevice.h>
411
		#include <IMeshSceneNode.h>
412
		#include <SMesh.h>
413
		#include <ISceneManager.h>
414
		#include <IMeshBuffer.h>
415
		#include <SMeshBuffer.h>
416
		#include <IGUIElement.h>
417
		#include <IGUIEnvironment.h>
418
		#endif
419
420
421
422
	#include "debug.h"
423
424
		#include <stdio.h>
425
		#include <jmutex.h>
426
		#include <jmutexautolock.h>
427
		#include <iostream>
428
		#include "irrlichttypes.h"
429
		#include <irrMap.h>
430
		#include "threads.h"
431
		#include "gettime.h"
432
		#include "exceptions.h"
433
		#include <map>
434
435
		#ifdef _WIN32
436
			#define WIN32_LEAN_AND_MEAN
437
			#ifndef _WIN32_WINNT
438
				#define _WIN32_WINNT 0x0500
439
			#endif
440
			#include <windows.h>
441
			#ifdef _MSC_VER
442
				#include <eh.h>
443
			#endif
444
445
			#define DTIME (getTimestamp()+": ")
446
			#define DEBUGSTREAM_COUNT
447
			extern FILE *g_debugstreams[DEBUGSTREAM_COUNT];
448
449
			extern void debugstreams_init(bool disable_stderr, const char *filename);
450
			extern void debugstreams_deinit();
451
			#define DEBUGPRINT(...)\
452
			{\
453
				for(int i=0; i<DEBUGSTREAM_COUNT; i++)\
454
				{\
455
					if(g_debugstreams[i] != NULL){\
456
						fprintf(g_debugstreams[i], __VA_ARGS__);\
457
						fflush(g_debugstreams[i]);\
458
459
460
461
462
463
464
	#include "test.h"
465
	#include "clouds.h"
466
	#include "server.h"
467
	#include "constants.h"
468
	#include "porting.h"
469
	#include "gettime.h"
470
	#include "guiMessageMenu.h"
471
	#include "filesys.h"
472
	#include "config.h"
473
	#include "guiMainMenu.h"
474
	#include "game.h"
475
	#include "keycode.h"
476
	#include "tile.h"
477
	#include "chat.h"
478
	#include "defaultsettings.h"
479
	#include "gettext.h"
480
	#include "settings.h"
481
	#include "profiler.h"
482
	#include "log.h"
483
	#include "mods.h"
484
	#if USE_FREETYPE
485
	#include "xCGUITTFont.h"
486
	#endif
487
	#include "util/string.h"
488
	#include "subgame.h"
489
	#include "quicktune.h"
490
	#include "serverlist.h"
491
492
493
// Note: The C++ reference material included within < > was taken from cplusplus.com
494
// © cplusplus.com, 2000-2013 - All rights reserved - v3.1
495
// Fair Use notice - for educational purposes only.