diff --git a/esm/listkeeper.d b/esm/listkeeper.d index 391852d493..3722a5d12e 100644 --- a/esm/listkeeper.d +++ b/esm/listkeeper.d @@ -200,17 +200,6 @@ class ListID(Type) : ListKeeper } } -/* -class Dummy : ListKeeper -{ - this() {} - void load() {} - void* lookup(char[] s) { return null; } - void endFile() {} - uint length() { return 0; } -} -*/ - // A pointer to an item struct ItemBase { @@ -284,10 +273,6 @@ struct ItemBaseList } } -// Um... I think this code is double up because I had to split it into -// separate files to avoid template stuff. I don't think we need to do -// that anymore. - // An item. Contains a reference to an ItemBase, which again is a // reference to an item. The ItemBase might change after we have // looked it up (for forward references), so we have to use a pointer. @@ -305,29 +290,6 @@ struct Item { return cast(T*)getPtr(Type); } - - /* Avoid the templates for now - alias getType!(Potion, ItemType.Potion) getPotion; - alias getType!(Apparatus, ItemType.Apparatus) getApparatus; - alias getType!(Armor, ItemType.Armor) getArmor; - alias getType!(Weapon, ItemType.Weapon) getWeapon; - alias getType!(Book, ItemType.Book) getBook; - alias getType!(Clothing, ItemType.Clothing) getClothing; - alias getType!(Light, ItemType.Light) getLight; - alias getType!(Ingredient, ItemType.Ingredient) getIngredient; - alias getType!(Tool, ItemType.Pick) getPick; - alias getType!(Tool, ItemType.Probe) getProbe; - alias getType!(Tool, ItemType.Repair) getRepair; - alias getType!(Misc, ItemType.Misc) getMisc; - alias getType!(LeveledItems, ItemType.ItemList) getItemList; - alias getType!(Creature, ItemType.Creature) getCreature; - alias getType!(LeveledCreatures, ItemType.CreatureList) getCreatureList; - alias getType!(NPC, ItemType.NPC) getNPC; - alias getType!(Door, ItemType.Door) getDoor; - alias getType!(Activator, ItemType.Activator) getActivator; - alias getType!(Static, ItemType.Static) getStatic; - alias getType!(Container, ItemType.Container) getContainer; - */ } struct ItemList diff --git a/esm/loadglob.d b/esm/loadglob.d index 32ee3c770e..aa2a8c767b 100644 --- a/esm/loadglob.d +++ b/esm/loadglob.d @@ -55,6 +55,8 @@ struct Global type = t; + // The value looks like a float in many cases, and like an integer + // in others (for the s type at least.) Figure it out. value = esFile.getHNFloat("FLTV"); } } diff --git a/esmtool.d b/esmtool.d index 6406978998..fd5ace8355 100644 --- a/esmtool.d +++ b/esmtool.d @@ -355,7 +355,11 @@ void printRaw() { writefln("'%s'", getHString()); } - else if(subName == "FLTV" || subName == "XSCL") writefln(getHFloat()); + else if(subName == "FLTV" || subName == "XSCL") + { + float f = getHFloat(); + writefln("f=", f, " i=", *(cast(int*)&f)); + } else if(subName == "INTV" /*|| subName == "NAM0"*/ || subName == "FRMR") writefln(getHVUint()); else