# HG changeset patch # User Cyborg16@cyborg64-win.lan # Date 1227387576 0 # Node ID ba035eba07b468638b60e64d1b32e02a3dcc3271 # Parent 71f0f1f836202a8c1e6fd1ca208b7def87662835 Compilation fixes for windows and unittest code. diff -r 71f0f1f83620 -r ba035eba07b4 bin/dummy.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/dummy.txt Sat Nov 22 20:59:36 2008 +0000 @@ -0,0 +1,3 @@ +Binaries should end up here. + +This file exists to make the version control create this directory. \ No newline at end of file diff -r 71f0f1f83620 -r ba035eba07b4 dsss.conf --- a/dsss.conf Sun Nov 16 17:03:47 2008 +0000 +++ b/dsss.conf Sat Nov 22 20:59:36 2008 +0000 @@ -1,4 +1,4 @@ -# Copyright © 2007-2008 Diggory Hardy +# Copyright © 2007-2008 Diggory Hardy # License: GNU General Public License version 2 or later (see COPYING) defaulttargets = mde/mde.d examples/guiDemo.d @@ -6,9 +6,6 @@ [*] version (Posix) { buildflags=-L-ldl - prebuild = mkdir bin -p -} else version (Windows) { - prebuild = mkdir bin } [mde/mde.d] diff -r 71f0f1f83620 -r ba035eba07b4 mde/lookup/Options.d --- a/mde/lookup/Options.d Sun Nov 16 17:03:47 2008 +0000 +++ b/mde/lookup/Options.d Sat Nov 22 20:59:36 2008 +0000 @@ -251,7 +251,7 @@ * Due to the way options are handled generically, string IDs must be used to access the options * via hash-maps, which is a little slower than direct access but necessary since the option * must be changed in two separate places. */ - void set(T) (char[] symbol, T val) { + /+deprecated void set(T) (char[] symbol, T val) { static assert (TIsIn!(T,TYPES) && !TIsIn!(T, CTYPES), "Options.set does not support type "~T.stringof); changed = true; // something got set (don't bother checking this isn't what it already was) @@ -263,12 +263,12 @@ // log and ignore: logger.error ("Options.set: invalid symbol"); } - } + }+/ /+ /** Get option symbol of an Options sub-class. * * Using this method to read an option is not necessary, but allows for generic use. */ - T get(T) (char[] symbol) { + deprecated T get(T) (char[] symbol) { static assert (TIsIn!(T,TYPES), "Options does not support type "~T.stringof); mixin (`alias opts`~TName!(T)~` optsVars;`); @@ -282,7 +282,7 @@ }+/ /** List the names of all options of a specific type. */ - char[][] list () { + deprecated char[][] list () { char[][] ret; mixin (listMixin!(TYPES)); return ret; diff -r 71f0f1f83620 -r ba035eba07b4 mde/mde.d --- a/mde/mde.d Sun Nov 16 17:03:47 2008 +0000 +++ b/mde/mde.d Sat Nov 22 20:59:36 2008 +0000 @@ -1,4 +1,4 @@ -/* LICENSE BLOCK +/* LICENSE BLOCK Part of mde: a Modular D game-oriented Engine Copyright © 2007-2008 Diggory Hardy @@ -43,7 +43,7 @@ this () { msg = "Welcome to mde.\nThis executable is only for testing, and\nas such doesn't do anything interesting."; debug msg ~= "\nRunning in debug mode."; - font = FontStyle.get("default");// get the default or fallback font + font = FontStyle.getDefault; // get the default or fallback font } void sizeEvent (int,int) {}; // Don't care what the size is void draw () { @@ -81,10 +81,11 @@ mainSchedule.add (mainSchedule.getNewID, &mde.events.pollEvents).frame = true; //END Main loop setup + double pollInterval = miscOpts.pollInterval(); while (run) { mainSchedule.execute (Clock.now()); - Thread.sleep (miscOpts.pollInterval); // sleep this many seconds + Thread.sleep (pollInterval); // sleep this many seconds } return 0; // cleanup handled by init's DTOR diff -r 71f0f1f83620 -r ba035eba07b4 mde/setup/Init.d --- a/mde/setup/Init.d Sun Nov 16 17:03:47 2008 +0000 +++ b/mde/setup/Init.d Sat Nov 22 20:59:36 2008 +0000 @@ -449,8 +449,8 @@ foreach (key,stage_p; stages) foreach (name; stage_p.depends) stages[name].rdepends ~= key; - auto realMaxThreads = miscOpts.maxThreads; - miscOpts.set!(int)("maxThreads", 4); // force up to 4 threads for unittest + int realMaxThreads = miscOpts.maxThreads(); + miscOpts.maxThreads = 4; // force up to 4 threads for unittest logger.level(Logger.Info); // hide a lot of trace messages logger.info ("You should see some warning messages starting \"InitStage\":"); @@ -490,7 +490,7 @@ assert (stages[toStageName("stg3")].state == cast(StageState)7); // set by the exception stages = realInit; // restore the real init stages - miscOpts.set!(int)("maxThreads", realMaxThreads); + miscOpts.maxThreads = realMaxThreads; logger.info ("Unittest complete."); } } diff -r 71f0f1f83620 -r ba035eba07b4 mde/setup/paths.d --- a/mde/setup/paths.d Sun Nov 16 17:03:47 2008 +0000 +++ b/mde/setup/paths.d Sat Nov 22 20:59:36 2008 +0000 @@ -280,7 +280,7 @@ char[] getFontPath (char[] file) { FilePath path = new FilePath (fontDir~file); if (path.exists && !path.isFolder) - return path.CString; + return path.cString; throw new NoFileException ("Unable to find font file: "~file); }