Mercurial > projects > mde
comparison mde/input/Config.d @ 86:79d816b3e2d2
New InitStage system, Screen & Screen.Drawable, separate testing and guiDemo binaries.
This (and the previous) commit are the result of several quite significant changes to mde. All the unittests run, but it hasn't had a huge amount of testing so don't be surprised if bugs show up.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 12 Sep 2008 17:36:14 +0100 |
parents | 56c0ddd90193 |
children | 2212285f714c |
comparison
equal
deleted
inserted
replaced
85:56c0ddd90193 | 86:79d816b3e2d2 |
---|---|
159 foreach (i, sec; file.dataset.sec) { | 159 foreach (i, sec; file.dataset.sec) { |
160 Config c = cast(Config) sec; | 160 Config c = cast(Config) sec; |
161 if (c) configs[i] = c; // Check, because we don't want null entries in configs | 161 if (c) configs[i] = c; // Check, because we don't want null entries in configs |
162 else debug logger.error ("Ended up with DataSection of wrong type; this should never happen."); | 162 else debug logger.error ("Ended up with DataSection of wrong type; this should never happen."); |
163 } | 163 } |
164 | |
165 debug (MDE_CONFIG_DUMP) { | |
166 logger.trace ("Loaded {} config sections.", configs.length); | |
167 foreach (id, cfg; configs) { | |
168 logger.trace ("Section " ~ id ~ | |
169 ":\n\tbutton:\t\t" ~ parseFrom!(uint[][][uint])(cfg.button) ~ | |
170 "\n\taxis:\t\t" ~ parseFrom!(uint[][][uint])(cfg.axis) ~ | |
171 "\n\trelMotion:\t" ~ parseFrom!(uint[][][uint])(cfg.relMotion) ); | |
172 } | |
173 } | |
174 } | 164 } |
175 | 165 |
176 private this() {} // Private since this class should only be created from here. | 166 private this() {} // Private since this class should only be created from here. |
177 | 167 |
178 void addTag (char[] tp, MT.ID id, char[] dt) { | 168 void addTag (char[] tp, MT.ID id, char[] dt) { |