27 #include "config.h" |
27 #include "config.h" |
28 #include "colors.h" |
28 #include "colors.h" |
29 #include "types.h" |
29 #include "types.h" |
30 #include "primitives.h" |
30 #include "primitives.h" |
31 #include "gldraw.h" |
31 #include "gldraw.h" |
|
32 #include "configDialog.h" |
32 |
33 |
33 List<LDFile*> g_loadedFiles; |
34 List<LDFile*> g_loadedFiles; |
34 ForgeWindow* g_win = null; |
35 ForgeWindow* g_win = null; |
35 const QApplication* g_app = null; |
36 const QApplication* g_app = null; |
36 File g_file_stdout (stdout, File::Write); |
37 File g_file_stdout (stdout, File::Write); |
37 File g_file_stderr (stderr, File::Write); |
38 File g_file_stderr (stderr, File::Write); |
38 static str g_versionString, g_fullVersionString; |
39 static str g_versionString, g_fullVersionString; |
39 |
40 |
40 const vertex g_origin (0.0f, 0.0f, 0.0f); |
41 const vertex g_origin (0.0f, 0.0f, 0.0f); |
41 const matrix g_identity ({1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}); |
42 const matrix g_identity ({1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f}); |
|
43 |
|
44 cfg (Bool, firststart, true); |
42 |
45 |
43 // ============================================================================= |
46 // ============================================================================= |
44 // ----------------------------------------------------------------------------- |
47 // ----------------------------------------------------------------------------- |
45 int main (int argc, char* argv[]) { |
48 int main (int argc, char* argv[]) { |
46 QApplication app (argc, argv); |
49 QApplication app (argc, argv); |
62 LDPaths::initPaths(); |
65 LDPaths::initPaths(); |
63 initColors(); |
66 initColors(); |
64 loadLogoedStuds(); |
67 loadLogoedStuds(); |
65 |
68 |
66 ForgeWindow* win = new ForgeWindow; |
69 ForgeWindow* win = new ForgeWindow; |
|
70 newFile(); |
|
71 win->show(); |
67 |
72 |
68 newFile(); |
73 // If this is the first start, get the user to configuration. Especially point |
|
74 // them to the profile tab, it's the most important form to fill in. |
|
75 if (firststart) { |
|
76 (new ConfigDialog (ConfigDialog::ProfileTab))->exec(); |
|
77 firststart = false; |
|
78 Config::save(); |
|
79 } |
|
80 |
69 loadPrimitives(); |
81 loadPrimitives(); |
70 |
|
71 win->show(); |
|
72 return app.exec(); |
82 return app.exec(); |
73 } |
83 } |
74 |
84 |
75 // ============================================================================= |
85 // ============================================================================= |
76 // ----------------------------------------------------------------------------- |
86 // ----------------------------------------------------------------------------- |