diff --git a/bsa/bsafile.d b/bsa/bsafile.d index ddb293c17..53dda3b70 100644 --- a/bsa/bsafile.d +++ b/bsa/bsafile.d @@ -24,14 +24,13 @@ module bsa.bsafile; //debug=checkHash; -debug(checkHash) import std.stdio; - // This file does not have any unit tests, since you really need the // data to test it. Use the program named 'bsatool', it uses the NIF // reader library and scans through a bsa archive, providing a good // test of both libraries. //import std.stream; +import std.stdio; import std.string; import std.mmfile; @@ -65,8 +64,14 @@ class BSAFile // multiple blocks may be mapped simultaneously. However, it MUST be // a multiple of the system page size. TODO: On my system it is 4K, // later on I will have to call getpagesize and the windows - // equivalent to find this. For now I just assume 8K is ok. - static int pageSize = 8*1024; + // equivalent to find this (include the word "granularity" when you + // google for it.) For now I just assume 4K is ok on UNIX, but on + // Windows we need 64K. (Hands up if you agree that MMFile should + // handle this internally!) + version(Windows) + static int pageSize = 64*1024; + else + static int pageSize = 4*1024; // Represents one file entry in the archive struct FileStruct diff --git a/core/inifile.d b/core/inifile.d index 5e3cba11c..19d3f6761 100644 --- a/core/inifile.d +++ b/core/inifile.d @@ -76,9 +76,13 @@ struct IniWriter } alias writeType!(int) writeInt; - alias writeType!(float) writeFloat; alias writeType!(char[]) writeString; + void writeFloat(char[] name, float f) + { + ini.writefln("%s=%.3s", name, f); + } + void writeBool(char[] name, bool b) { ini.writefln("%s=%s", name, b?"yes":"no"); diff --git a/morro.ini b/morro.ini index 45d34f718..324087062 100644 --- a/morro.ini +++ b/morro.ini @@ -10,8 +10,8 @@ Screenshots=11 Default Cell=Sud [Controls] -Mouse Sensitivity X=0.20000000298023223877 -Mouse Sensitivity Y=0.20000000298023223877 +Mouse Sensitivity X=0.2 +Mouse Sensitivity Y=0.2 Flip Mouse Y Axis=no [Bindings] @@ -38,7 +38,7 @@ Screen Shot=print_screen Quick Exit=q,escape [Sound] -Main Volume=0.6999999880790710449 -Music Volume=0.40000000596046447754 -SFX Volume=0.60000002384185791016 +Main Volume=0.7 +Music Volume=0.4 +SFX Volume=0.6 Enable Music=yes