Changeset 84:e0f1ec7fe73a
- Timestamp:
- 08/31/08 10:59:17
(3 months ago)
- Author:
- Diggory Hardy <diggory.hardy@gmail.com>
- Parents:
82:ac1e3fd07275 83:2813ac68576f
- branch:
- default
- Message:
Merge plus a few tweaks.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r80 |
r84 |
|
| 19 | 19 | 3 Update scheduler as outlined in FIXME. |
|---|
| 20 | 20 | 3 Windows building/compatibility (currently partial) - tango/sys/win32/SpecialPath.d |
|---|
| | 21 | 2 Why does mde.events need to be imported before mde.setup.Init to make fonts display properly? Analysis of static CTORs doesn't seem to have helped. |
|---|
| 21 | 22 | 2 Remove ability to scan, then load, mergetag sections. Not so necessary with section creator callback and allows "sliding window" type partial buffering. |
|---|
| 22 | 23 | 2 Options need a "level": simple options, for advanced users, for debugging only, etc. |
|---|
| r80 |
r84 |
|
| 19 | 19 | 3 Update scheduler as outlined in FIXME. |
|---|
| 20 | 20 | 3 Windows building/compatibility (currently partial) - tango/sys/win32/SpecialPath.d |
|---|
| | 21 | 2 Why does mde.events need to be imported before mde.setup.Init to make fonts display properly? Analysis of static CTORs doesn't seem to have helped. |
|---|
| 21 | 22 | 2 Remove ability to scan, then load, mergetag sections. Not so necessary with section creator callback and allows "sliding window" type partial buffering. |
|---|
| 22 | 23 | 2 Options need a "level": simple options, for advanced users, for debugging only, etc. |
|---|
| r81 |
r84 |
|
| 65 | 65 | FT_Int maj, min, patch; |
|---|
| 66 | 66 | FT_Library_Version (library, &maj, &min, &patch); |
|---|
| 67 | | if (maj != 2 || min != 3) |
|---|
| | 67 | if (maj != 2 || min != 3) { |
|---|
| 68 | 68 | logger.warn ("Using an untested FreeType version: {}.{}.{}", maj, min, patch); |
|---|
| | 69 | logger.info ("The only tested version of freetype is 2.3.5"); |
|---|
| | 70 | } |
|---|
| 69 | 71 | |
|---|
| 70 | 72 | // Set LCD filtering method if LCD rendering is enabled. |
|---|
| r83 |
r84 |
|
| 22 | 22 | import mde.font.exception; |
|---|
| 23 | 23 | |
|---|
| 24 | | import mde.mergetag.Reader; |
|---|
| 25 | | import mde.mergetag.DataSet; |
|---|
| 26 | | import mde.mergetag.exception; |
|---|
| | 24 | import mde.file.mergetag.Reader; |
|---|
| | 25 | import mde.file.mergetag.DataSet; |
|---|
| 27 | 26 | import mde.setup.paths; |
|---|
| 28 | 27 | |
|---|
| … | … | |
| 30 | 29 | import derelict.opengl.gl; |
|---|
| 31 | 30 | |
|---|
| 32 | | import mde.mergetag.deserialize; |
|---|
| | 31 | import mde.file.deserialize; |
|---|
| 33 | 32 | import tango.stdc.stringz; |
|---|
| 34 | 33 | import Util = tango.text.Util; |
|---|
| … | … | |
| 60 | 59 | private const fileName = "fonts"; |
|---|
| 61 | 60 | void initialize () { |
|---|
| 62 | | if (!confDir.exists (fileName)) |
|---|
| 63 | | throw new fontException ("No font settings file (fonts.[mtt|mtb])"); |
|---|
| 64 | | |
|---|
| 65 | 61 | if (FT_Init_FreeType (&library)) |
|---|
| 66 | 62 | throw new fontException ("error initialising the FreeType library"); |
|---|
| … | … | |
| 113 | 109 | throw new fontException ("No fallback font style specified"); |
|---|
| 114 | 110 | fallbackName = *p; |
|---|
| 115 | | } |
|---|
| 116 | | catch (MTException e) { |
|---|
| 117 | | throw new fontException ("Mergetag exception: "~e.msg); |
|---|
| | 111 | } catch (NoFileException) { |
|---|
| | 112 | throw new fontException ("No font settings file (fonts.[mtt|mtb])"); |
|---|
| | 113 | } catch (Exception e) { |
|---|
| | 114 | throw new fontException ("Reading font settings failed: "~e.msg); |
|---|
| 118 | 115 | } |
|---|
| 119 | 116 | |
|---|
| r81 |
r84 |
|
| 63 | 63 | this (char[] file) { |
|---|
| 64 | 64 | super(file); |
|---|
| 65 | | |
|---|
| | 65 | } |
|---|
| | 66 | |
|---|
| | 67 | // NOTE - temporarily here to allow CTOR to run safely during static this |
|---|
| | 68 | // called during init |
|---|
| | 69 | void init () { |
|---|
| 66 | 70 | // Events we want to know about: |
|---|
| 67 | 71 | imde.input.addMouseClickCallback(&clickEvent); |
|---|
| r80 |
r84 |
|
| 63 | 63 | this (char[] file) { |
|---|
| 64 | 64 | super(file); |
|---|
| 65 | | |
|---|
| | 65 | } |
|---|
| | 66 | |
|---|
| | 67 | // NOTE - temporarily here to allow CTOR to run safely during static this |
|---|
| | 68 | // called during init |
|---|
| | 69 | void init () { |
|---|
| 66 | 70 | // Events we want to know about: |
|---|
| 67 | 71 | imde.input.addMouseClickCallback(&clickEvent); |
|---|
| … | … | |
| 188 | 192 | import mde.gui.widget.createWidget; |
|---|
| 189 | 193 | |
|---|
| 190 | | import mde.mergetag.Reader; |
|---|
| 191 | | import mde.mergetag.Writer; |
|---|
| | 194 | import mde.file.mergetag.Reader; |
|---|
| | 195 | import mde.file.mergetag.Writer; |
|---|
| 192 | 196 | import mde.setup.paths; |
|---|
| 193 | 197 | |
|---|
| … | … | |
| 221 | 225 | if (allLoaded || (defaultDesign !is null && allDesigns == false)) |
|---|
| 222 | 226 | return; // test if already loaded |
|---|
| 223 | | |
|---|
| 224 | | if (!confDir.exists (fileName)) { |
|---|
| 225 | | logger.error ("Unable to load GUI: no config file!"); |
|---|
| 226 | | return; // not a fatal error (so long as the game can run without a GUI!) |
|---|
| 227 | | } |
|---|
| 228 | 227 | |
|---|
| 229 | 228 | // Set up a reader |
|---|
| … | … | |
| 267 | 266 | } else |
|---|
| 268 | 267 | reader.read([defaultDesign]); |
|---|
| | 268 | } catch (NoFileException) { |
|---|
| | 269 | logger.error ("Unable to load GUI: no config file!"); |
|---|
| | 270 | // just return: not a fatal error (so long as the game can run without a GUI!) |
|---|
| 269 | 271 | } catch (Exception e) { |
|---|
| 270 | 272 | logger.error ("Unable to load GUI: errors parsing config file ("~confDir.getFileName(fileName,PRIORITY.HIGH_LOW)~"):"); |
|---|
| r82 |
r84 |
|
| 117 | 117 | static Config[char[]] configs; /// All configs loaded by load(). |
|---|
| 118 | 118 | private static TreeBag!(char[]) loadedFiles; // all filenames load tried to read |
|---|
| 119 | | |
|---|
| 120 | 119 | private static Logger logger; |
|---|
| 121 | | static this() { |
|---|
| 122 | | logger = Log.getLogger ("mde.input.Config"); |
|---|
| 123 | | } |
|---|
| 124 | 120 | |
|---|
| 125 | 121 | //BEGIN File loading/saving code |
|---|
| 126 | 122 | static this () { |
|---|
| | 123 | logger = Log.getLogger ("mde.input.Config"); |
|---|
| 127 | 124 | loadedFiles = new TreeBag!(char[]); |
|---|
| 128 | 125 | } |
|---|
| r79 |
r84 |
|
| 19 | 19 | import mde.input.exception; |
|---|
| 20 | 20 | |
|---|
| 21 | | import MT = mde.mergetag.Reader; |
|---|
| | 21 | import MT = mde.file.mergetag.Reader; |
|---|
| 22 | 22 | import mde.setup.paths; |
|---|
| 23 | | import mde.mergetag.deserialize; |
|---|
| 24 | | debug import mde.mergetag.serialize; |
|---|
| | 23 | import mde.file.deserialize; |
|---|
| | 24 | debug import mde.file.serialize; |
|---|
| 25 | 25 | |
|---|
| 26 | 26 | import tango.util.log.Log : Log, Logger; |
|---|
| … | … | |
| 117 | 117 | static Config[char[]] configs; /// All configs loaded by load(). |
|---|
| 118 | 118 | private static TreeBag!(char[]) loadedFiles; // all filenames load tried to read |
|---|
| 119 | | |
|---|
| 120 | 119 | private static Logger logger; |
|---|
| 121 | | static this() { |
|---|
| 122 | | logger = Log.getLogger ("mde.input.config.Config"); |
|---|
| 123 | | } |
|---|
| 124 | 120 | |
|---|
| 125 | 121 | //BEGIN File loading/saving code |
|---|
| 126 | 122 | static this () { |
|---|
| | 123 | logger = Log.getLogger ("mde.input.Config"); |
|---|
| 127 | 124 | loadedFiles = new TreeBag!(char[]); |
|---|
| 128 | 125 | } |
|---|
| r82 |
r84 |
|
| 15 | 15 | |
|---|
| 16 | 16 | /** This module handles stored options, currently all except input maps. |
|---|
| 17 | | * |
|---|
| 18 | | * The purpose of having all options centrally controlled is to allow generic handling by the GUI |
|---|
| 19 | | * and ease saving and loading of values. The Options class is only really designed around handling |
|---|
| 20 | | * small numbers of variables for now. |
|---|
| 21 | | */ |
|---|
| | 17 | * |
|---|
| | 18 | * The purpose of having all options centrally controlled is to allow generic handling by the GUI |
|---|
| | 19 | * and ease saving and loading of values. The Options class is only really designed around handling |
|---|
| | 20 | * small numbers of variables for now. |
|---|
| | 21 | * |
|---|
| | 22 | * Note: This module uses some non-spec functionality, which "works for me", but may need to be |
|---|
| | 23 | * changed if it throws up problems. Specifically: templated virtual functions (Options.set, get |
|---|
| | 24 | * and list), and accessing private templates from an unrelated class (Options.TName, TYPES). |
|---|
| | 25 | * OptionChanges used to have a templated set member function (used by Options.set), which caused |
|---|
| | 26 | * linker problems when the module wasn't compiled from scratch. |
|---|
| | 27 | */ |
|---|
| 22 | 28 | module mde.lookup.Options; |
|---|
| 23 | 29 | |
|---|
| … | … | |
| 51 | 57 | * have been changed, is merged with options from the user conf dir and saved on exit. |
|---|
| 52 | 58 | */ |
|---|
| | 59 | /* An idea for potentially extending Options, but which doesn't seem necessary now: |
|---|
| | 60 | Move static code from Options to an OptionSet class, which may be sub-classed. These sub-classes |
|---|
| | 61 | may be hooked in to the master OptionSet class to shadow all Options classes and be notified of |
|---|
| | 62 | changes, and may or may not have values loaded from files during init. Change-sets could be |
|---|
| | 63 | rewritten to use this. |
|---|
| | 64 | However, only the changesets should need to be notified of each change (gui interfaces could simply |
|---|
| | 65 | be notified that a change occured and redraw everything; users of options can just re-take their |
|---|
| | 66 | values every time they use them). */ |
|---|
| 53 | 67 | class Options : IDataSection |
|---|
| 54 | 68 | { |
|---|
| | 69 | protected this() {} /// Do not instantiate directly. |
|---|
| | 70 | |
|---|
| 55 | 71 | // All supported types, for generic handling via templates. It should be possible to change |
|---|
| 56 | 72 | // the supported types simply by changing this list now (untested). |
|---|
| r80 |
r84 |
|
| 15 | 15 | |
|---|
| 16 | 16 | /** This module handles stored options, currently all except input maps. |
|---|
| 17 | | * |
|---|
| 18 | | * The purpose of having all options centrally controlled is to allow generic handling by the GUI |
|---|
| 19 | | * and ease saving and loading of values. The Options class is only really designed around handling |
|---|
| 20 | | * small numbers of variables for now. |
|---|
| 21 | | */ |
|---|
| | 17 | * |
|---|
| | 18 | * The purpose of having all options centrally controlled is to allow generic handling by the GUI |
|---|
| | 19 | * and ease saving and loading of values. The Options class is only really designed around handling |
|---|
| | 20 | * small numbers of variables for now. |
|---|
| | 21 | * |
|---|
| | 22 | * Note: This module uses some non-spec functionality, which "works for me", but may need to be |
|---|
| | 23 | * changed if it throws up problems. Specifically: templated virtual functions (Options.set, get |
|---|
| | 24 | * and list), and accessing private templates from an unrelated class (Options.TName, TYPES). |
|---|
| | 25 | * OptionChanges used to have a templated set member function (used by Options.set), which caused |
|---|
| | 26 | * linker problems when the module wasn't compiled from scratch. |
|---|
| | 27 | */ |
|---|
| 22 | 28 | module mde.lookup.Options; |
|---|
| 23 | 29 | |
|---|
| … | … | |
| 25 | 31 | import mde.exception; |
|---|
| 26 | 32 | |
|---|
| 27 | | import mde.mergetag.Reader; |
|---|
| 28 | | import mde.mergetag.Writer; |
|---|
| 29 | | import mde.mergetag.DataSet; |
|---|
| 30 | | import mde.mergetag.exception; |
|---|
| 31 | | import mde.mergetag.serialize; |
|---|
| | 33 | import mde.file.mergetag.Reader; |
|---|
| | 34 | import mde.file.mergetag.Writer; |
|---|
| | 35 | import mde.file.mergetag.DataSet; |
|---|
| | 36 | import mde.file.serialize; |
|---|
| 32 | 37 | |
|---|
| 33 | 38 | import tango.core.Exception : ArrayBoundsException; |
|---|
| … | … | |
| 52 | 57 | * have been changed, is merged with options from the user conf dir and saved on exit. |
|---|
| 53 | 58 | */ |
|---|
| | 59 | /* An idea for potentially extending Options, but which doesn't seem necessary now: |
|---|
| | 60 | Move static code from Options to an OptionSet class, which may be sub-classed. These sub-classes |
|---|
| | 61 | may be hooked in to the master OptionSet class to shadow all Options classes and be notified of |
|---|
| | 62 | changes, and may or may not have values loaded from files during init. Change-sets could be |
|---|
| | 63 | rewritten to use this. |
|---|
| | 64 | However, only the changesets should need to be notified of each change (gui interfaces could simply |
|---|
| | 65 | be notified that a change occured and redraw everything; users of options can just re-take their |
|---|
| | 66 | values every time they use them). */ |
|---|
| 54 | 67 | class Options : IDataSection |
|---|
| 55 | 68 | { |
|---|
| | 69 | protected this() {} /// Do not instantiate directly. |
|---|
| | 70 | |
|---|
| 56 | 71 | // All supported types, for generic handling via templates. It should be possible to change |
|---|
| 57 | 72 | // the supported types simply by changing this list now (untested). |
|---|
| … | … | |
| 135 | 150 | private const fileName = "options"; |
|---|
| 136 | 151 | void load () { |
|---|
| 137 | | // Check it exists (if not it should still be created on exit). |
|---|
| 138 | | // Don't bother checking it's not a folder, because it could still be a block or something. |
|---|
| 139 | | if (!confDir.exists (fileName)) return; |
|---|
| 140 | | |
|---|
| 141 | 152 | try { |
|---|
| 142 | 153 | IReader reader; |
|---|
| … | … | |
| 149 | 160 | }; |
|---|
| 150 | 161 | reader.read; |
|---|
| 151 | | } catch (MTException e) { |
|---|
| 152 | | logger.fatal ("Loading options aborted:"); |
|---|
| 153 | | logger.fatal (e.msg); |
|---|
| 154 | | throw new optionsLoadException ("Mergetag exception (see above message)"); |
|---|
| | 162 | } catch (NoFileException e) { |
|---|
| | 163 | // Just return. Options file will be created on exit. |
|---|
| | 164 | } catch (Exception e) { |
|---|
| | 165 | logger.warn ("Loading options failed: "~e.msg); |
|---|
| | 166 | logger.warn ("If warning persists, delete the offending file."); // FIXME - delete the bad file somehow |
|---|
| 155 | 167 | } |
|---|
| 156 | 168 | } |
|---|
| … | … | |
| 171 | 183 | } catch (NoFileException) { |
|---|
| 172 | 184 | // No user file exists; not an error. |
|---|
| 173 | | } catch (MTException e) { |
|---|
| | 185 | } catch (Exception e) { |
|---|
| 174 | 186 | // Log a message and continue, overwriting the file: |
|---|
| 175 | | logger.error ("Loading options aborted:"); |
|---|
| 176 | | logger.error (e.msg); |
|---|
| | 187 | logger.error ("Loading options aborted: " ~ e.msg); |
|---|
| 177 | 188 | } |
|---|
| 178 | 189 | |
|---|
| … | … | |
| 181 | 192 | writer = confDir.makeMTWriter (fileName, ds); |
|---|
| 182 | 193 | writer.write(); |
|---|
| 183 | | } catch (MTException e) { |
|---|
| 184 | | logger.error ("Saving options aborted! Reason:"); |
|---|
| 185 | | logger.error (e.msg); |
|---|
| | 194 | } catch (Exception e) { |
|---|
| | 195 | logger.error ("Saving options aborted: "~e.msg); |
|---|
| 186 | 196 | } |
|---|
| 187 | 197 | } |
|---|
| … | … | |
| 189 | 199 | private Logger logger; |
|---|
| 190 | 200 | static this() { |
|---|
| 191 | | logger = Log.getLogger ("mde.options"); |
|---|
| | 201 | logger = Log.getLogger ("mde.lookup.Options"); |
|---|
| 192 | 202 | } |
|---|
| 193 | 203 | } |
|---|
| … | … | |
| 196 | 206 | |
|---|
| 197 | 207 | //BEGIN Non-static |
|---|
| | 208 | /+ NOTE: according to spec: "Templates cannot be used to add non-static members or virtual |
|---|
| | 209 | functions to classes." However, this appears to work (but linking problems did occur). |
|---|
| | 210 | Alternative: use mixins. From OptionsChanges: |
|---|
| | 211 | // setT (used to be a template, but: |
|---|
| | 212 | // Templates cannot be used to add non-static members or virtual functions to classes. ) |
|---|
| | 213 | template setMixin(A...) { |
|---|
| | 214 | static if (A.length) { |
|---|
| | 215 | const char[] setMixin = `void set`~TName!(A[0])~` (ID id, `~A[0].stringof~` x) { |
|---|
| | 216 | `~TName!(T)~`s[id] = x; |
|---|
| | 217 | } |
|---|
| | 218 | ` ~ setMixin!(A[1..$]); |
|---|
| | 219 | } else |
|---|
| | 220 | const char[] setMixin = ``; |
|---|
| | 221 | }+/ |
|---|
| 198 | 222 | /** Set option symbol of an Options sub-class to val. |
|---|
| 199 | 223 | * |
|---|
| … | … | |
| 204 | 228 | static assert (TIsIn!(T,TYPES), "Options does not support type "~T.stringof); |
|---|
| 205 | 229 | |
|---|
| 206 | | mixin (`alias opts`~TName!(T)~` optsVars;`); |
|---|
| 207 | | |
|---|
| 208 | 230 | changed = true; // something got set (don't bother checking this isn't what it already was) |
|---|
| 209 | 231 | |
|---|
| 210 | 232 | try { |
|---|
| 211 | | *(optsVars[cast(ID) symbol]) = val; |
|---|
| 212 | | optionChanges.set!(T) (cast(ID) symbol, val); |
|---|
| | 233 | mixin (`*(opts`~TName!(T)~`[cast(ID) symbol]) = val;`); |
|---|
| | 234 | mixin (`optionChanges.`~TName!(T)~`s[symbol] = val;`); |
|---|
| 213 | 235 | } catch (ArrayBoundsException) { |
|---|
| 214 | 236 | // log and ignore: |
|---|
| … | … | |
| 405 | 427 | const char[] writeAllMixin = ``; |
|---|
| 406 | 428 | } |
|---|
| 407 | | |
|---|
| 408 | 429 | } |
|---|
| 409 | 430 | //END Templates |
|---|
| … | … | |
| 413 | 434 | |
|---|
| 414 | 435 | this () {} |
|---|
| 415 | | |
|---|
| 416 | | void set(T) (ID id, T x) { |
|---|
| 417 | | static assert (Options.TIsIn!(T,TYPES), "Options does not support type "~T.stringof); |
|---|
| 418 | | |
|---|
| 419 | | mixin (`alias `~TName!(T)~`s vars;`); |
|---|
| 420 | | vars[id] = x; |
|---|
| 421 | | } |
|---|
| 422 | 436 | |
|---|
| 423 | 437 | //BEGIN Mergetag loading/saving code |
|---|
| r82 |
r84 |
|
| 16 | 16 | /** Modular D Engine |
|---|
| 17 | 17 | * |
|---|
| 18 | | * This module contains main(), which calls Init and runs the main loop. |
|---|
| | 18 | * This module contains a minimal main() function. Practically, it is useful for running unittests |
|---|
| | 19 | * and some other testing. It also serves as a basic example program. |
|---|
| 19 | 20 | */ |
|---|
| 20 | 21 | module mde.mde; |
|---|
| 21 | 22 | |
|---|
| 22 | | // Comment to show use, where only used minimally: |
|---|
| 23 | | |
|---|
| 24 | 23 | import mde.imde; // this module's interface for external modules |
|---|
| 25 | | import mde.events; // pollEvents |
|---|
| | 24 | import mde.events; // pollEvents() // NOTE: Must be imported before Init, otherwise fonts don't display properly (why??) |
|---|
| | 25 | import mde.setup.Init; // initialization |
|---|
| 26 | 26 | import mde.lookup.Options; // pollInterval option |
|---|
| 27 | | |
|---|
| | 27 | import mde.scheduler.Scheduler; // mainSchedule |
|---|
| 28 | 28 | import gl = mde.gl.draw; // gl.draw() |
|---|
| 29 | | import mde.input.Input; // new Input() |
|---|
| 30 | | |
|---|
| 31 | | import mde.setup.Init; |
|---|
| 32 | | import mde.scheduler.Scheduler; // Scheduler.run() |
|---|
| 33 | | import mde.setup.exception; // InitException |
|---|
| 34 | 29 | |
|---|
| 35 | 30 | import tango.core.Thread : Thread; // Thread.sleep() |
|---|
| … | … | |
| 43 | 38 | int main(char[][] args) |
|---|
| 44 | 39 | { |
|---|
| 45 | | //BEGIN Initialisation |
|---|
| 46 | | Logger logger = Log.getLogger ("mde.mde"); |
|---|
| | 40 | // If compiled with unittests, notify that they completed and exit: |
|---|
| 47 | 41 | debug (mdeUnitTest) { |
|---|
| | 42 | Logger logger = Log.getLogger ("mde.mde"); |
|---|
| 48 | 43 | logger.info ("Compiled unittests have completed; terminating."); |
|---|
| 49 | 44 | return 0; |
|---|
| 50 | 45 | } |
|---|
| 51 | 46 | |
|---|
| 52 | | scope Init init; |
|---|
| 53 | | try { |
|---|
| 54 | | init = new Init(args); // initialisation |
|---|
| 55 | | } catch (InitException e) { |
|---|
| 56 | | logger.fatal ("Initialisation failed: " ~ e.msg); |
|---|
| 57 | | return 1; |
|---|
| 58 | | } |
|---|
| | 47 | scope Init init = new Init(args); // initialize mde |
|---|
| 59 | 48 | |
|---|
| | 49 | // Make sure pollInterval has a sane value. FIXME: get Options class to enforce range |
|---|
| 60 | 50 | if (miscOpts.pollInterval !<= 1.0 || miscOpts.pollInterval !>= 0.0) |
|---|
| 61 | 51 | miscOpts.set!(double) ("pollInterval", 0.01); |
|---|
| 62 | | //END Initialisation |
|---|
| 63 | 52 | |
|---|
| 64 | 53 | //BEGIN Main loop setup |
|---|
| r83 |
r84 |
|
| 22 | 22 | |
|---|
| 23 | 23 | import mde.imde; // this module's interface for external modules |
|---|
| | 24 | import mde.events; // pollEvents() // NOTE: Must be imported before Init, otherwise fonts don't display properly (why??) |
|---|
| 24 | 25 | import mde.setup.Init; // initialization |
|---|
| 25 | 26 | import mde.lookup.Options; // pollInterval option |
|---|
| 26 | 27 | import mde.scheduler.Scheduler; // mainSchedule |
|---|
| 27 | | import mde.events; // pollEvents() |
|---|
| 28 | 28 | import gl = mde.gl.draw; // gl.draw() |
|---|
| 29 | 29 | |
|---|
| … | … | |
| 31 | 31 | import tango.time.Clock; // Clock.now() |
|---|
| 32 | 32 | import tango.util.log.Log : Log, Logger; |
|---|
| | 33 | debug (mdeUnitTest) { |
|---|
| | 34 | import mde.file.ssi; |
|---|
| | 35 | import mde.file.mergetag.mdeUT; |
|---|
| | 36 | } |
|---|
| 33 | 37 | |
|---|
| 34 | 38 | int main(char[][] args) |
|---|
| r75 |
r84 |
|
| 53 | 53 | try { |
|---|
| 54 | 54 | font.FontStyle.initialize; |
|---|
| | 55 | gui.init; |
|---|
| 55 | 56 | gui.loadDesign(); |
|---|
| 56 | 57 | cleanup.addFunc (&guiSave, "guiSave"); |
|---|
| r75 |
r84 |
|
| 53 | 53 | try { |
|---|
| 54 | 54 | font.FontStyle.initialize; |
|---|
| | 55 | gui.init; |
|---|
| 55 | 56 | gui.loadDesign(); |
|---|
| 56 | 57 | cleanup.addFunc (&guiSave, "guiSave"); |
|---|