Mercurial > projects > mde
comparison mde/file/paths.d @ 137:9f035cd139c6
BIG commit. Major change: old Options class is gone, all content values are loaded and saved automatically. All options updated to reflect this, some changed.
Content restrutured a lot:
New IContent module, Content module includes more functionality.
New ContentLoader module to manage content loading/saving/translation.
Translation module moved to content dir and cut down to reflect current usage.
File format unchanged except renames: FontOptions -> Font, VideoOptions -> Screen.
Font render mode and LCD filter options are now enums.
GUI loading needs to create content (and set type for enums), but doesn't save/load value.
Some setup of mainSchedule moved to mde.mainLoop.
Content callbacks are called on content change now.
ContentLists are set up implicitly from content symbols. Not as fast but much easier!
Bug-fix in the new MTTagReader.
Renamed MT *Reader maker functions to avoid confusion in paths.d.
New mde.setup.logger module to allow logger setup before any other module's static this().
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 07 Feb 2009 12:46:03 +0000 |
parents | 4084f07f2c7a |
children | e785e98d3b78 |
comparison
equal
deleted
inserted
replaced
136:4084f07f2c7a | 137:9f035cd139c6 |
---|---|
108 * ds = The dataset, as for mergetag. | 108 * ds = The dataset, as for mergetag. |
109 */ | 109 */ |
110 IWriter makeMTWriter (char[] file, DataSet ds = null) | 110 IWriter makeMTWriter (char[] file, DataSet ds = null) |
111 { | 111 { |
112 // FIXME: use highest priority writable path | 112 // FIXME: use highest priority writable path |
113 return makeWriter (paths[pathsLen-1] ~ file, ds, WriterMethod.Text); | 113 return getMTWriter (paths[pathsLen-1] ~ file, ds, WriterMethod.Text); |
114 } | 114 } |
115 | 115 |
116 /** Creates an MTTagWriter for file. */ | 116 /** Creates an MTTagWriter for file. */ |
117 MTTagWriter makeMTWriter (char[] file) | 117 MTTagWriter makeMTTagWriter (char[] file) |
118 { | 118 { |
119 // FIXME: use highest priority writable path | 119 // FIXME: use highest priority writable path |
120 return makeMTTagWriter (paths[pathsLen-1] ~ file); | 120 return getMTTagWriter (paths[pathsLen-1] ~ file); |
121 } | 121 } |
122 | 122 |
123 /** Returns a string listing the file name or names (if readOrder is not | 123 /** Returns a string listing the file name or names (if readOrder is not |
124 * HIGH_ONLY and multiple matches are found), or an error message. Intended | 124 * HIGH_ONLY and multiple matches are found), or an error message. Intended |
125 * for user output only. */ | 125 * for user output only. */ |
161 FilePath file = findFile (paths[i]~filename); | 161 FilePath file = findFile (paths[i]~filename); |
162 if (file !is null) | 162 if (file !is null) |
163 ret ~= file; | 163 ret ~= file; |
164 } | 164 } |
165 } else { | 165 } else { |
166 assert (readOrder == PRIORITY.HIGH_LOW || | 166 debug assert (readOrder == PRIORITY.HIGH_LOW || |
167 readOrder == PRIORITY.HIGH_ONLY ); | 167 readOrder == PRIORITY.HIGH_ONLY ); |
168 | 168 |
169 for (int i = pathsLen - 1; i >= 0; --i) { | 169 for (int i = pathsLen - 1; i >= 0; --i) { |
170 FilePath file = findFile (paths[i]~filename); | 170 FilePath file = findFile (paths[i]~filename); |
171 if (file !is null) | 171 if (file !is null) |