1 diff -r -u -x .svn arc/font.d /usr/include/d/arc/font.d
2 --- arc/font.d 2010-03-18 02:47:34.000000000 +0100
3 +++ /usr/include/d/arc/font.d 2010-03-18 01:45:51.000000000 +0100
7 tango.text.convert.Integer,
9 + tango.io.device.File,
15 logger.info("Loading new font " ~ nameStr);
17 - this.fontData = cast(ubyte[])(new File(fontPath)).read(); // we'll store the data in a buffer, because FreeType doesn't copy it.
18 + this.fontData = cast(ubyte[])(new File(fontPath)).load(); // we'll store the data in a buffer, because FreeType doesn't copy it.
21 args.memory_base = this.fontData.ptr;
22 diff -r -u -x .svn arc/math/routines.d /usr/include/d/arc/math/routines.d
23 --- arc/math/routines.d 2010-03-18 01:27:42.000000000 +0100
24 +++ /usr/include/d/arc/math/routines.d 2010-03-18 02:41:31.885351651 +0100
29 - static if(Tango.Minor >= 998)
31 - return cast(int)(a + (Kiss.instance.toInt() % (b+1-a) ));
34 - return cast(int)(a + (Kiss.shared.toInt() % (b+1-a) ));
36 + return cast(int)(a + (Kiss.instance.toInt() % (b+1-a) ));
40 diff -r -u -x .svn arc/sound.d /usr/include/d/arc/sound.d
41 --- arc/sound.d 2010-03-18 02:47:34.000000000 +0100
42 +++ /usr/include/d/arc/sound.d 2010-03-18 01:45:51.000000000 +0100
47 - tango.io.FileConduit,
48 - tango.io.MappedBuffer,
49 + tango.io.device.File,
50 + tango.io.device.FileMap,
53 import tango.stdc.stringz : toStringz;
54 import tango.text.convert.Integer : toString;
55 import tango.text.convert.Float : toString;
57 +import tango.util.Convert;
60 /// logger for this module
64 // Get first four bytes of sound file to determine type
65 // And then load the file. sound_file will have all of our important info
66 - auto fdata = new MappedBuffer(filename,FileConduit.ReadExisting);
67 + auto fdata = new MappedFile(filename,File.ReadExisting);
70 - char[] data = cast(char[])fdata.slice();
71 + char[] data = cast(char[])fdata.map();
76 /// A Wave implementation of BaseSoundFile
77 private class WaveFile : BaseSoundFile
79 - MappedBuffer mmbuffer;
80 + MappedFile mmbuffer;
83 /// Open a wave file and store attributes from its headers
86 logger.info("Loading WAV file " ~ filename);
88 - mmbuffer = new MappedBuffer(filename, FileConduit.ReadExisting);
89 - file = cast(char[])mmbuffer.slice();
90 + mmbuffer = new MappedFile(filename, File.ReadExisting);
91 + file = cast(char[])mmbuffer.map();
93 // First 4 bytes of Wave file should be "RIFF"
94 if (file[0..4] != "RIFF")
98 file = fopen(toStringz(filename), toStringz("rb"));
99 - if(ov_open(file, &vf, null, 0) < 0)
100 - logger.fatal("'"~filename~"' is not an Ogg Vorbis file.\n");
102 + auto err = ov_open(file, &vf, null, 0);
104 + logger.fatal("'"~filename~"' is not an Ogg Vorbis file. Error code: \n"~to!(char[])(err)~".");
105 vorbis_info *vi = ov_info(&vf, -1);
107 // Get relevant data from the file
109 buffer.length = _size;
111 while (ret<_size) // because it may take several requests to fill our buffer
112 - ret += ov_read(&vf, cast(byte*)buffer[ret..length], _size-ret, 0, 2, 1, ¤t_section);
113 + ret += ov_read(&vf, cast(byte*)buffer[ret..$].ptr, _size-ret, 0, 2, 1, ¤t_section);